ZF-7955: Zend_Application_Bootstrap_BootstrapAbstract - resource Methods arent marked as "run"

Description

Zend_Application_Bootstrap_BootstrapAbstract, Line 664: it should be

$this->_markRun($resourceName);

and not

$this->_markRun($resource);

So the resource methods arent marked as "run" correctly and are called several times if dependencies are set in other resource methods.

Comments

Could you please provide a unit test or other code that proves this issue? With both $resource and $resourceName all unittests pass.

Hi,

its a little bit tricky :)

Just use the following Bootstrap class and you will see that the FunctionTest will be called 3 times:

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap {

protected $_counter = 1;


protected function _initFunctionTesta()
{
    $this->bootstrap('FunctionTest');
}

protected function _initFunctionTestb()
{
    $this->bootstrap('FunctionTest');
}

protected function _initFunctionTest()
{
    echo 'CALL Nr. '.$this->_counter.'<br />';
    $this->_counter += 1;

}    

}

====== if i would use the bootstrap method with lower case (e.g. $this->bootstrap('functiontest'); ) all is working fine. the problem is that in line 664: $resource is used and not $resourceName, which is filtered by a strtolower.

Confirmed for me. Fix is located at r18454