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

Add PSR-11 support to ServiceManager #180

Merged

Conversation

weierophinney
Copy link
Member

This patch updates the container-interop/container-interop constraint to ^1.2, and explicitly adds psr/container with a constraint of ^1.0; this immediately allows Zend\ServiceManager\ServiceManager to be used as a PSR-11 container.

Moreover, this patch provides a test validating that assertion.

@weierophinney weierophinney added this to the 3.3.0 milestone Feb 15, 2017
Updates `ServiceLocatorInterface` to implement **both** the
psr/container and container-interop `ContainerInterface`
implementations.

Could not modify it to _only_ implement the psr/container interface, as
that does not fulfill the type necessary for the various factories.
@byan
Copy link

byan commented Feb 21, 2017

How we should deal with \Interop\Container\ContainerInterface in implements of the following factories interface like Factory, InvokableFactory, etc?

@weierophinney
Copy link
Member Author

@byan Read the proposed psr-11.md file and changelog - I cover the topic in those.

Also, updated the container-interop-implementation constraint to `^1.2`.
@weierophinney weierophinney merged commit c4fffd9 into zendframework:develop Mar 1, 2017
weierophinney added a commit that referenced this pull request Mar 1, 2017
@weierophinney weierophinney deleted the feature/psr-container branch March 1, 2017 18:45
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.

2 participants