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

Commit 5a61b44

Browse files
committed
Explicitly implement Psr\Container\ContainerInterface
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.
1 parent 49c9493 commit 5a61b44

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/ServiceLocatorInterface.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77

88
namespace Zend\ServiceManager;
99

10-
use Interop\Container\ContainerInterface;
11-
use Interop\Container\Exception\ContainerException;
10+
use Psr\Container\ContainerInterface as PsrContainerInterface;
11+
use Psr\Container\ContainerExceptionInterface;
12+
use Interop\Container\ContainerInterface as InteropContainerInterface;
1213

1314
/**
1415
* Interface for service locator
1516
*/
16-
interface ServiceLocatorInterface extends ContainerInterface
17+
interface ServiceLocatorInterface extends
18+
PsrContainerInterface,
19+
InteropContainerInterface
1720
{
1821
/**
1922
* Build a service by its name, using optional options (such services are NEVER cached).
@@ -25,7 +28,7 @@ interface ServiceLocatorInterface extends ContainerInterface
2528
* factory could be found to create the instance.
2629
* @throws Exception\ServiceNotCreatedException If factory/delegator fails
2730
* to create the instance.
28-
* @throws ContainerException if any other error occurs
31+
* @throws ContainerExceptionInterface if any other error occurs
2932
*/
3033
public function build($name, array $options = null);
3134
}

0 commit comments

Comments
 (0)