diff --git a/src/AbstractPluginManager.php b/src/AbstractPluginManager.php index 2e0f6566..a1b1a1fa 100644 --- a/src/AbstractPluginManager.php +++ b/src/AbstractPluginManager.php @@ -70,7 +70,6 @@ abstract class AbstractPluginManager extends ServiceManager public function __construct(ConfigurationInterface $configuration = null) { parent::__construct($configuration); - $this->addInitializer(array($this, 'validatePlugin'), true); $self = $this; $this->addInitializer(function ($instance) use ($self) { if ($instance instanceof ServiceManagerAwareInterface) { @@ -113,6 +112,7 @@ public function get($name, $options = array(), $usePeeringServiceManagers = true $this->creationOptions = $options; $instance = parent::get($name, $usePeeringServiceManagers); $this->creationOptions = null; + $this->validatePlugin($instance); return $instance; }