# Container-interop/container-interop is abandoned

**URL:** https://discourse.laminas.dev/t/container-interop-container-interop-is-abandoned/1260
**Category:** Components & MVC
**Created:** [December 4, 2019, 1:20pm UTC](https://discourse.laminas.dev/t/container-interop-container-interop-is-abandoned/1260 "2019-12-04T13:20:31Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![pasglop](https://avatars.discourse-cdn.com/v4/letter/p/73ab20/32.png) [@pasglop](https://discourse.laminas.dev/u/pasglop)
#### Post date: [December 4, 2019, 1:20pm UTC](https://discourse.laminas.dev/t/container-interop-container-interop-is-abandoned/1260/1 "2019-12-04T13:20:32Z")

</div>

Hi,  
What is the solution to part with this package in ZF3 (but is it necessary) ?

myserver# composer info container-interop/container-interop  
name : container-interop/container-interop  
descrip. : Promoting the interoperability of container objects (DIC, SL, etc.)  
keywords :  
versions : \* 1.2.0  
type : library  
…  
source : [git] [https://github.com/container-interop/container-interop.git](https://github.com/container-interop/container-interop.git) 79cbf1341c22ec75643d841642dd5d6acd83bdb8  
…  
names : container-interop/container-interop  
**Attention: This package is abandoned and no longer maintained. The author suggests using the psr/container package instead.**

Thanks you

---

<div class="post-metadata">

### Author: ![matthew](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/matthew/32/14_2.png) [@matthew](https://discourse.laminas.dev/u/matthew)
#### Post date: [December 4, 2019, 3:04pm UTC](https://discourse.laminas.dev/t/container-interop-container-interop-is-abandoned/1260/2 "2019-12-04T15:04:48Z")

</div>

Hi, @pasglop!

zend-servicemanager adopted container-interop in its version 3 release, which happened before PSR-11 was completed. Unfortunately, that means that for this major version lifecycle, we cannot switch to the PSR-11 interfaces, as it would break backwards compatibility (due to differing inheritance trees).

I’m well aware of the deprecation of the container-interop package; I was one of the ones who voted to do that. Abandonment does not mean _uninstallable_, however, and we’ll have to rely on that until we can do a new major version. This will likely be sometime early next year, after the Laminas launch.

In the meantime, you can continue using the code, and ignore the warning.

---

<div class="post-metadata">

### Author: ![pasglop](https://avatars.discourse-cdn.com/v4/letter/p/73ab20/32.png) [@pasglop](https://discourse.laminas.dev/u/pasglop)
#### Post date: [December 4, 2019, 3:20pm UTC](https://discourse.laminas.dev/t/container-interop-container-interop-is-abandoned/1260/3 "2019-12-04T15:20:22Z")

</div>

Thank you very much, it’s perfect.

---

<div class="post-metadata">

### Author: ![andrei-dascalu](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/andrei-dascalu/32/567_2.png) [@andrei-dascalu](https://discourse.laminas.dev/u/andrei-dascalu)
#### Post date: [December 6, 2019, 1:40pm UTC](https://discourse.laminas.dev/t/container-interop-container-interop-is-abandoned/1260/4 "2019-12-06T13:40:06Z")

</div>

On this topic, I am also curious about zend-servicemanager.

It has adopted both psr/container (also in v3) and the now abandoned container-interop/container-interop which use compatible (though not via signature).

How come it uses both container interfaces? And since it does, wouldn’t it be possible to simply make interop a suggested addition (so as not to break BC) so that those projects that specifically need it can make it a hard requirement, freeing everyone else to move on ?

---

<div class="post-metadata">

### Author: ![matthew](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/matthew/32/14_2.png) [@matthew](https://discourse.laminas.dev/u/matthew)
#### Post date: [December 6, 2019, 3:58pm UTC](https://discourse.laminas.dev/t/container-interop-container-interop-is-abandoned/1260/5 "2019-12-06T15:58:12Z")

</div>

It uses both interfaces because usage of container-interop _predates_ our usage of PSR-11; we were tracking the spec while it was still in development, and released version 3 before PSR-11 was ratified.

And no, we can’t just have it remove the container-interop dependency. Why? Because we use it in _typehints_. As an example, the `FactoryInterface`, `InitializerInterface`, `LazyServiceFactory` and `InvokableFactory` all typehint against it in their `__invoke()` methods, among other usage. If we were to remove container-interop from the component, _any code implementing those interfaces or extending those classes would break_, due to the typehint change. As such, we cannot crop the dependency until we do a new major version; if we do, we’d also need to provide tooling to help people update their own code. This is not a minor undertaking, and with the Laminas transition, we’ve had to postpone it. Once the transition is complete, we’ll be creating a list of projects like these and prioritizing them.

---

<div class="post-metadata">

### Author: ![Apv3](https://avatars.discourse-cdn.com/v4/letter/a/54ee81/32.png) [@Apv3](https://discourse.laminas.dev/u/Apv3)
#### Post date: [December 9, 2019, 8:18pm UTC](https://discourse.laminas.dev/t/container-interop-container-interop-is-abandoned/1260/6 "2019-12-09T20:18:30Z")

</div>

Mind that the current code in container-interop simply extends the preferred code found in psr/container. In that respect psr/container is actually doing the job container/interop did before that project was abandoned. That yellow warning when running a composer update is a bit annoying, but my conclusion after looking at the code is that the message can be ignored. Everything has been taken care of with elegance…
