magento-configurator icon indicating copy to clipboard operation
magento-configurator copied to clipboard

Default Yaml Decode mistakes color codes for comments

Open mblarsen opened this issue 9 years ago • 0 comments

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

mblarsen avatar Aug 30 '16 11:08 mblarsen