diff --git a/module/VuFind/src/VuFind/ServiceManager/AbstractPluginManager.php b/module/VuFind/src/VuFind/ServiceManager/AbstractPluginManager.php index 6e83f1039bcf023d98c3773e43d256c847429094..4c555e8237ffdedad478abf6096bb42a47c64324 100644 --- a/module/VuFind/src/VuFind/ServiceManager/AbstractPluginManager.php +++ b/module/VuFind/src/VuFind/ServiceManager/AbstractPluginManager.php @@ -28,6 +28,7 @@ namespace VuFind\ServiceManager; use Zend\ServiceManager\AbstractPluginManager as Base, Zend\ServiceManager\ConfigInterface, + Zend\ServiceManager\DelegatorFactoryInterface, Zend\ServiceManager\Exception\RuntimeException as ServiceManagerRuntimeException; /** @@ -74,8 +75,12 @@ abstract class AbstractPluginManager extends Base */ public function validatePlugin($plugin) { + if ($plugin instanceof DelegatorFactoryInterface) { + return; + } + $expectedInterface = $this->getExpectedInterface(); - if (!($plugin instanceof $expectedInterface)) { + if (!$plugin instanceof $expectedInterface) { throw new ServiceManagerRuntimeException( 'Plugin ' . get_class($plugin) . ' does not belong to ' . $expectedInterface