ZF-11363: Allow dashes in keys of yaml files

Issue Type: Improvement Created: 2011-05-11T11:52:33.000+0000 Last Updated: 2012-05-09T15:59:24.000+0000 Status: Resolved Fix version(s): - 1.12.0 (27/Aug/12)

Reporter: Jur Jean (jurjean) Assignee: Maksym Sliesarenko (sm) Tags: - Zend_Config

  • state:patch-ready-for-review
  • zf-crteam-review

Related issues: Attachments: - ZF-11363.patch


Keys in yaml files containing dashes are broken and end up with only the last part of the key:

<pre class="highlight">
      route: my/route

...will result in...

<pre class="highlight">
      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.


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

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.