You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This codeception plugin uses Interop\Container\ContainerInterface. According to the github page of Interop:
"Starting Feb. 13th 2017, container-interop is officially deprecated in favor of PSR-11. Container-interop has been the test-bed of PSR-11. From v1.2, container-interop directly extends PSR-11 interfaces. Therefore, all containers implementing container-interop are now de-facto compatible with PSR-11."
Is it possible to use Psr\Container\ContainerInterface instead of Interop\Container\ContainerInterface?
(Interop\Container\ContainerInterface uses also PSR-11)
It looks like laminas/laminas-servicemanager v4+ has officially dropped support for the deprecated Interop\Container\ContainerInterface and now strictly implements Psr\Container\ContainerInterface.
As a result, when trying to update to laminas/laminas-servicemanager v4, tests start to fail due to the Mezzio module in Codeception still type-hinting against the legacy Interop\Container\ContainerInterface:
TypeError: Cannot assign Laminas\ServiceManager\ServiceManager to property Codeception\Lib\Connector\Mezzio::$container of type Interop\Container\ContainerInterface in /var/www/vendor/codeception/module-mezzio/src/Codeception/Lib/Connector/Mezzio.php:144
Since container-interop has been deprecated for years and the transition to PSR-11 is long established, updating the type hint to Psr\Container\ContainerInterface in this module would be a good step forward for compatibility with modern Laminas versions.
Activity
mairo744 commentedon Aug 5, 2025
It looks like
laminas/laminas-servicemanagerv4+ has officially dropped support for the deprecatedInterop\Container\ContainerInterfaceand now strictly implementsPsr\Container\ContainerInterface.As a result, when trying to update to
laminas/laminas-servicemanagerv4, tests start to fail due to the Mezzio module in Codeception still type-hinting against the legacyInterop\Container\ContainerInterface:Since container-interop has been deprecated for years and the transition to PSR-11 is long established, updating the type hint to
Psr\Container\ContainerInterfacein this module would be a good step forward for compatibility with modern Laminas versions.