#2555 introduced a new method getContainer for the CallableResolverInterface.
This is actually a hack that is used to hide a real dependency to the ContainerInterface. Classes that use CallableResolverInterface::getContainer need to be refactored to depend on ContainerInterface directly and the method CallableResolverInterface::getContainer should be removed again.
Here is an example how Slim\Routable uses the CallableResolver to fetch the container:
$this->callableResolver->getContainer():
|
if (is_string($middleware)) { |
|
$middleware = new DeferredResolutionMiddleware($middleware, $this->callableResolver->getContainer()); |
#2555 introduced a new method
getContainerfor theCallableResolverInterface.This is actually a hack that is used to hide a real dependency to the
ContainerInterface. Classes that useCallableResolverInterface::getContainerneed to be refactored to depend onContainerInterfacedirectly and the methodCallableResolverInterface::getContainershould be removed again.Here is an example how
Slim\Routableuses theCallableResolverto fetch the container:$this->callableResolver->getContainer():Slim/Slim/Routable.php
Lines 63 to 64 in 5311e95