Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use PSR ContainerInterface instead of Interop #26

Merged
merged 1 commit into from
Feb 18, 2022
Merged

Use PSR ContainerInterface instead of Interop #26

merged 1 commit into from
Feb 18, 2022

Conversation

cooperaj
Copy link
Contributor

Q A
Documentation no
Bugfix yes
BC Break yes
New Feature no
RFC no
QA no

Description

When using a PSR11 Container such as elie29/zend-di-config it is not possible to use the included delegator factory as it is hardcoded to use the Interop\Container\ContainerInterface, even though that interface has extended Psr\Container\ContainerInterface for some time now.

This PR swaps out for the Psr version thus allowing PSR11 containers to be configured.

Fixes #24

Signed-off-by: Adam Cooper <adam@acpr.dev>
@boesing
Copy link
Member

boesing commented Feb 15, 2022

Note to myself: since the class was final and container-interop implements the psr interface, we do still accept interop interfaces and thus this should not be a BC break.
Have to double check this when I have some more time, but afaik we do conflict in laminas-cache with container-interop <1.2

Sorry that it takes that long @cooperaj

@cooperaj
Copy link
Contributor Author

No worries. I'll be honest, I was confused about the BC break but I wasn't going to argue with the maintainer ;)

@boesing
Copy link
Member

boesing commented Feb 18, 2022

To summarize

This is no BC break due to the fact, that laminas/laminas-cache since v3 requires laminas/laminas-servicemanager in v3.7.0+.
laminas/laminas-servicemanager in v3.7.0+ requires container-interop/container-interop v1.2.0+.
container-interop/container-interop in v1.2.0+ implements psr/container and thus, we do still accept the injection of container-interop container instances.

@boesing boesing modified the milestones: 3.0.0, 2.0.1, 2.1.0 Feb 18, 2022
@boesing boesing merged commit 289717d into laminas:2.1.x Feb 18, 2022
@boesing
Copy link
Member

boesing commented Feb 18, 2022

Thanks, @cooperaj!

@cooperaj cooperaj deleted the to-psr-container-interface branch August 16, 2022 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants