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

Commit c1677f9

Browse files
committed
Fixed extension incompatibilities
1 parent 7a26cce commit c1677f9

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/Router/RoutePluginManager.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,25 @@ public function validatePlugin($plugin)
104104
*
105105
* @param string $name
106106
* @param string $class
107+
* @param bool $shared
107108
* @return self
108109
*/
109-
public function setInvokableClass($name, $class)
110+
public function setInvokableClass($name, $class, $shared = null)
110111
{
111112
foreach ($this->createAliasesForInvokables([$name => $class]) as $name => $class) {
112113
$this->setAlias($name, $class);
114+
115+
if (is_bool($shared)) {
116+
$this->setShared($name, $shared);
117+
}
113118
}
114119

115120
foreach ($this->createFactoriesForInvokables([$name => $class]) as $name => $factory) {
116121
$this->setFactory($name, $factory);
122+
123+
if (is_bool($shared)) {
124+
$this->setShared($name, $shared);
125+
}
117126
}
118127

119128
return $this;

src/Service/ServiceListenerFactory.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Zend\ServiceManager\Exception\ServiceNotCreatedException;
1717
use Zend\ServiceManager\FactoryInterface;
1818
use Zend\ServiceManager\Factory\InvokableFactory;
19+
use Zend\ServiceManager\ServiceLocatorInterface;
1920

2021
class ServiceListenerFactory implements FactoryInterface
2122
{

0 commit comments

Comments
 (0)