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

Commit aa89d30

Browse files
committed
Merge branch 'hotfix/90'
Close #90
2 parents 129f00d + 0a371ad commit aa89d30

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

CHANGELOG.md

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

2222
### Fixed
2323

24-
- Nothing.
24+
- [#90](https://github.com/zendframework/zend-servicemanager/pull/90) fixes
25+
several examples in the configuration chapter of the documentation, ensuring
26+
that the signatures are correct.
2527

2628
## 3.0.2 - 2016-01-24
2729

doc/book/configuring-the-service-manager.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ closure. This leads to more readable code. For instance:
8888

8989
class MyObjectFactory implements FactoryInterface
9090
{
91-
public function __invoke(ContainerInterface $container, $requestedName)
91+
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
9292
{
9393
$dependency = $container->get(stdClass::class);
9494
return new MyObject($dependency);
@@ -123,7 +123,7 @@ For instance, if two services share the same creation pattern, you could attach
123123

124124
class MyObjectFactory implements FactoryInterface
125125
{
126-
public function __invoke(ContainerInterface $container, $requestedName)
126+
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
127127
{
128128
$dependency = $container->get(stdClass::class);
129129
return new $requestedName($dependency);
@@ -175,7 +175,7 @@ class MyAbstractFactory implements AbstractFactoryInterface
175175
return in_array('Traversable', class_implements($requestedName), true);
176176
}
177177

178-
public function __invoke(ContainerInterface $container, $requestedName)
178+
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
179179
{
180180
return $requestedName();
181181
}
@@ -292,7 +292,7 @@ Alternately, you can create a class that implements
292292

293293
class MyInitializer implements InitializerInterface
294294
{
295-
public function __invoke(ServiceLocatorInterface $serviceLocator, $instance)
295+
public function __invoke(ContainerInterface $container, $instance)
296296
{
297297
if (! $instance instanceof EventManagerAwareInterface) {
298298
return;

0 commit comments

Comments
 (0)