ZF2-38: Modules bootstraps continue resources executing

Issue Type: Bug Created: 2011-07-20T09:49:39.000+0000 Last Updated: 2012-05-31T15:50:17.000+0000 Status: Resolved Fix version(s): Reporter: Evgheni Poleacov (zendmania) Assignee: Evgheni Poleacov (zendmania) Tags: - Application

  • Bootstrap

Related issues: Attachments:


Every module bootstrap after calling bootstrap() method execute application resources registered in broker stack once more.

Main problem not in twice executing (because broker know which resources already registered and don't execute it), but in cause of broker which unknown about resources which goes after config option which starts execute module resource. For example we have next config options:

<pre class="highlight">
resources.modules[] =
resources.customresource.test = true

and "customresource" would be executed before module resource shutdown. That's take a problem when "customresource" try to get "modules" resource, and receive empty executed bootstraps stack, because it started before complete executing of "modules".

Cause of it in common broker and next lines:

<pre class="highlight">
foreach ($this->getBroker()->getRegisteredPlugins() as $resource) {

\Zend\Application\AbstractBootstrap.php method _bootstrap()

I have already found and bugfixing proposal sources is ready. Continue with pull request.


Posted by Evgheni Poleacov (zendmania) on 2011-07-26T08:19:47.000+0000

Resolved by commit: 984453a5f5bf44a35bb4571a65dfe45e4f1517c0

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.