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

Commit eef8077

Browse files
committed
Merge branch 'feature/4' into develop
Close #4
2 parents 4518451 + dec1c89 commit eef8077

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ All notable changes to this project will be documented in this file, in reverse
66

77
### Added
88

9-
- Nothing.
9+
- [#4](https://github.com/zendframework/zend-servicemanager/pull/4) updates the
10+
`ServiceManager` to [implement the container-interop interface](https://github.com/container-interop/container-interop),
11+
allowing interoperability with applications that consume that interface.
1012

1113
### Deprecated
1214

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
}
1414
},
1515
"require": {
16-
"php": ">=5.5"
16+
"php": ">=5.5",
17+
"container-interop/container-interop": "*"
1718
},
1819
"require-dev": {
1920
"zendframework/zend-di": "~2.5",

src/ServiceManager.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
namespace Zend\ServiceManager;
1111

12-
class ServiceManager implements ServiceLocatorInterface
12+
use Interop\Container\ContainerInterface;
13+
14+
class ServiceManager implements ServiceLocatorInterface, ContainerInterface
1315
{
1416
/**@#+
1517
* Constants

test/ServiceManagerTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ public function setup()
3434
$this->serviceManager = new ServiceManager;
3535
}
3636

37+
public function testInteroperabilityInterface()
38+
{
39+
$serviceManager = new ServiceManager();
40+
$this->assertInstanceOf("Interop\Container\ContainerInterface", $serviceManager);
41+
}
42+
3743
/**
3844
* @covers Zend\ServiceManager\ServiceManager::__construct
3945
*/

0 commit comments

Comments
 (0)