ZF2-30: Multiple initialization of \Zend\Application\Resource plugins
Description
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.
Comments
Posted by Evgheni Poleacov (zendmania) on 2011-07-07T14:45:25.000+0000
I tried to fix that, but to much linkage between resources there.
Posted by Evgheni Poleacov (zendmania) on 2011-07-14T06:59:58.000+0000
Fixed with next commits:
http://git.zendframework.com//…
http://git.zendframework.com//…