ZF2-30: Multiple initialization of \Zend\Application\Resource plugins
When we using modular application and some kinds of resources for example: "router","frontcontroller", etc.
This resources initialized many times (as many as amount of modules).
How to reproduce: Simple put debug message after line 556 of \Zend\Application\AbtractBootstrap like that:
$plugin = $broker->load($resource); $return = $plugin->init(); \Zend\Debug::dump($resource); unset($this->_started[$resourceName]); $this->_markRun($resourceName);
By this code you can see that resources initialized by broker multiple times.
That happens because we call "_markRun" method of module bootstrap, but we should call broker to mark this resource like initialized per broker not per every bootstrap.