Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default Yaml Decode mistakes color codes for comments #10

Open
mblarsen opened this issue Aug 30, 2016 · 0 comments
Open

Default Yaml Decode mistakes color codes for comments #10

mblarsen opened this issue Aug 30, 2016 · 0 comments

Comments

@mblarsen
Copy link

mblarsen commented Aug 30, 2016

The default Yaml decoder (provided by Zend_Config_Yaml) is too naive and removes mistakes color codes for comments. So this is not possible config.yaml:

- global:
    core_config:
      -
        path: themecolor/colors/primary_color
        value: "#ff00aa"

Value will simply be false

For those who wants to fix it manually it Open Zend\Config\Yaml.php and replace the regexp in line 295 and 323 with the following:

(?!#.+")(#.+)

This will strip away #ff00aa but not "#ff00aa".

A better solution would be to either require a proper Yaml paser or at least to make a note of it in the README file or output it when running php configurator.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant