ZF2-309: support of [] operator in nested ini config
Description
Example:
foo.bar = foobar
foobar[] = foobarArray
foo.baz[] = foobaz1
foo.baz[] = foobaz2
Expected:
array (
'foo' =>
array (
'bar' => 'foobar',
'baz' =>
array (
0 => 'foobaz1',
1 => 'foobaz2',
),
),
'foobar' =>
array (
0 => 'foobarArray',
)
)
Actual:
array (
'foo' =>
array (
'bar' => 'foobar',
),
'foobar' =>
array (
0 => 'foobarArray',
),
'foo.baz' =>
array (
0 => 'foobaz1',
1 => 'foobaz2',
),
)
I just rewrote the application.config.php of an example ZF2 project into the INI equivalent (or what I thought would be). I was pretty much confused that the nested part (foo.baz) was not resolved correctly. Is that for any specific/important reason? Could we add this as an improvement?
Comments
Posted by Robert Boloc (robertboloc) on 2012-08-24T10:04:15.000+0000
pull request: https://github.com/zendframework/zf2/pull/2233
Posted by Maks 3w (maks3w) on 2012-08-25T08:09:04.000+0000
Patch merged. Thank you for your contribution