Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Switch from container-interop/container-interop to psr/container in a backward compatible manner #22

Merged

Conversation

weierophinney
Copy link
Member

@weierophinney weierophinney commented Apr 12, 2022

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

Description

This patch switches from using container-interop as a dependency to using laminas-servicemanager 3.11.2+.
Internally, it also modifies all container-interop implementations to be psr/container implementations, and modifies type-checking to check against psr/container instead of container-interop.

Since laminas-servicemanager at those versions provides and replaces container-interop, this change is backwards compatible.
(This demonstration validates the approach.)

Fixes #20

This patch switches from using container-interop to PSR-11.

There were three container-interop **implementations**:

- `Exception\NotFoundException`
- `Symmetric\SymmetricPluginManager`
- `Symmetric\PaddingPluginManager`

These are all internal classes.
The exception is thrown by the two plugin manager implementations, and those are straight-up `ContainerInterface` implementations.

The classes that consume the plugin managers were checking for container-interop `ContainerInterface` implementations previously, but now check for PSR-11 versions, which is considered a type-widening operation, and thus backwards compatible.
If we assume that the plugin managers are considered internal details, then this would be backwards compatible; if not, this is a BC break.

Signed-off-by: Matthew Weier O'Phinney <[email protected]>
Since this package **provides** and **replaces** container-interop, this _should_ allow slip-streaming it in via a minor release without any BC breaks.

Signed-off-by: Matthew Weier O'Phinney <[email protected]>
@weierophinney weierophinney added this to the 3.8.0 milestone Apr 12, 2022
Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@Ocramius Ocramius self-assigned this Apr 12, 2022
@Ocramius Ocramius changed the title Switch to psr/container Switch from container-interop/container-interop to psr/container in a backward compatible manner Apr 12, 2022
@Ocramius Ocramius merged commit 0972bb9 into laminas:3.8.x Apr 12, 2022
@weierophinney weierophinney deleted the feature/container-interop-removal branch April 12, 2022 15:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Removal of container-interop/container-interop
2 participants