Issues

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

Patch merged. Thank you for your contribution