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

Implement container-interop #4

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
}
},
"require": {
"php": ">=5.5"
"php": ">=5.5",
"container-interop/container-interop": "*"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: this should be a constrained version (1.0.*)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry #5

},
"require-dev": {
"zendframework/zend-di": "~2.5",
Expand Down
4 changes: 3 additions & 1 deletion src/ServiceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

namespace Zend\ServiceManager;

class ServiceManager implements ServiceLocatorInterface
use Interop\Container\ContainerInterface;

class ServiceManager implements ServiceLocatorInterface, ContainerInterface
{
/**@#+
* Constants
Expand Down
6 changes: 6 additions & 0 deletions test/ServiceManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ public function setup()
$this->serviceManager = new ServiceManager;
}

public function testInteroperabilityInterface()
{
$serviceManager = new ServiceManager();
$this->assertInstanceOf("Interop\Container\ContainerInterface", $serviceManager);
}

/**
* @covers Zend\ServiceManager\ServiceManager::__construct
*/
Expand Down