ZF-11363: Allow dashes in keys of yaml files
Description
Keys in yaml files containing dashes are broken and end up with only the last part of the key:
router:
routes:
my-route:
route: my/route
...will result in...
router:
routes:
route:
route: my/route
This is due the regex using /w, and is easily fixed by adding the dash (line 134).
I know, the documentation states 'specifying other parsers should you want more complex syntax' but just for a dash this seems overkill, especially as the other config classes DO support them.
Comments
Posted by Rob Allen (rob) on 2011-05-27T02:09:22.000+0000
Assigned to Stanislav for consideration as he wrote Zend_Config_Yaml
Posted by Maksym Sliesarenko (sm) on 2011-12-12T12:29:00.000+0000
Attached patch with fix and tests.
Posted by Adam Lundrigan (adamlundrigan) on 2012-02-24T18:23:14.000+0000
Patch works for me; all tests (both bug-specific and component-wide) pass. This is supported by the spec, so I see no reason not to include it. Same goes for ZF-11934.
Posted by Adam Lundrigan (adamlundrigan) on 2012-05-09T15:59:24.000+0000
Fixed in trunk (1.12.0): r24786