diff --git a/application/src/ServiceManager/AbstractPluginManager.php b/application/src/ServiceManager/AbstractPluginManager.php index 7d11b35fe3..1d5e906ac0 100644 --- a/application/src/ServiceManager/AbstractPluginManager.php +++ b/application/src/ServiceManager/AbstractPluginManager.php @@ -38,6 +38,24 @@ public function __construct($configOrContainerInterface = null, array $v3config } } + /** + * Register service names that were set via setFactory(). + */ + public function setFactory($name, $factory) + { + parent::setFactory($name, $factory); + $this->registeredNames[$name] = $name; + } + + /** + * Register service names that were set via setInvokableClass(). + */ + public function setInvokableClass($name, $class = null) + { + parent::setInvokableClass($name, $factory); + $this->registeredNames[$name] = $name; + } + /** * Set the registered names. *