Skip to content
This repository has been archived by the owner on Feb 6, 2020. It is now read-only.

Bug with array_merge_recursive #279

Open
thomasvargiu opened this issue Feb 15, 2019 · 1 comment
Open

Bug with array_merge_recursive #279

thomasvargiu opened this issue Feb 15, 2019 · 1 comment

Comments

@thomasvargiu
Copy link
Contributor

thomasvargiu commented Feb 15, 2019

I'm trying to do something like this:

$config1 = [
    'factories`=> [
        // factories
    ],
    'lazy_services' => [
        'class_map' => [
            'Foo' => 'Foo',
        ],
    ],
];
$config2 = [
    'factories`=> [
        // factories
    ],
    'lazy_services' => [
        'class_map' => [
            'Foo' => 'Foo',
        ],
    ],
];

$container = new ServiceManager($config1);
$container->configure($config2);

This will result on internal lazy_services property the following:

$this->lazy_services = [
    'class_map' => [
        'Foo' => [
            'Foo',
            'Foo',
        ],
    ].
];

The problem is the use of array_merge_recursive() function in this line.

Same problem with delegators property.

I found this issue using zend-mvc and an already configured container, then Zend\ModuleManager\Listener\ServiceListener reconfigure it adding configuration from ModuleManager features.

thomasvargiu added a commit to thomasvargiu/zend-servicemanager that referenced this issue Feb 15, 2019
thomasvargiu added a commit to thomasvargiu/zend-servicemanager that referenced this issue Feb 15, 2019
thomasvargiu added a commit to thomasvargiu/zend-servicemanager that referenced this issue Jul 4, 2019
@weierophinney
Copy link
Member

This repository has been closed and moved to laminas/laminas-servicemanager; a new issue has been opened at laminas/laminas-servicemanager#4.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants