Closed soren121 closed 6 years ago
Thanks!
@soren121 I've had to remove the 3.3.0 tag which includes this change as it has a bug. If the container is a pure PSR-11 container interface the call to set
will fail as it does not define the set
method.
container-interop never had a set
method. Your library was always implementation-dependent.
PSR-11 and container-interop are identical interfaces, so I think you have to explicitly check for a set
method if you want your tests to pass.
so I think you have to explicitly check for a set method if you want your tests to pass.
This is exactly what I'm going to do.
I'm a fan of the change to attributes in the 4.x branch, but in the meantime, it'd be nice if the 3.x branch supported PSR-11 containers. I updated my project to use PHP-DI 6 and this library broke because of the container type check. Containers that implement container-interop will still work since
Interop\Container\ContainerInterface
extends fromPsr\Container\ContainerInterface
now.