elie29 / zend-di-config

PSR-11 PHP-DI container configurator for Laminas, Mezzio, ZF, Expressive applications or any framework that needs a PSR-11 container
MIT License
19 stars 4 forks source link

Use the standard ZE container config test suite #18

Closed gdsmith closed 6 years ago

gdsmith commented 6 years ago

This implementation doesn't pass all the tests from the config test suite. I added it locally and it fails the tests.

elie29 commented 6 years ago

Thank you for this issue. I didn't provide all keys from the service manager configuration. However, you are welcome to enhance the implementation.

elie29 commented 6 years ago

I added the config test suite. In the creation method you need to add dependencies key to your $config. Second, as we are using autowire technique, the invalid tests won't be correct, because the container would resolve automatically the object, as per example, Delegator.class.

However, I figured out that invokables should be an array of services as well as key/name array and when the key is different than the name, we should aliased the name. I will create an issue for that, and do not hesitate to create more issues.

thx @gdsmith !