Issues

ZF-8150: If frontController resource not present in application.ini bootstrap initialize exists class with resource name

Description


[tests]
pluginpaths.Rediska_Zend_Application_Resource = "Rediska/Zend/Application/Resource"

resources.rediska.namespace = "Rediska_Test_"
resources.rediska.servers.0.host = 127.0.0.1
resources.rediska.servers.0.port = 6379

require_once 'Rediska.php'; //Other class with name 'Rediska'
$application = new Zend_Application('tests', REDISKA_TESTS_PATH . '/Test/Zend/Application/application.ini');
$rediska = $application->bootstrap()->getBootstrap()->getResource('rediska');

In Zend_Application_Bootstrap_BootstrapAbstract in line 357 class requred before ('Rediska') will be initialized!

Comments

What is the actual outcome, and what outcome were you expecting?

Actual - bootstrap initialize as resource already included class with name 'Rediska' Expected - bootstrap include and initialize resource Rediska_Zend_Application_Resource_Rediska

I'me fix bug by adding frontcontroller resource to application.ini:


[tests]
pluginpaths.Rediska_Zend_Application_Resource = "Rediska/Zend/Application/Resource"

resources.frontController.env = 'tests' ;Hack for fix Zend_Application bootstraping bug

resources.rediska.namespace = "Rediska_Test_"
resources.rediska.servers.0.host = 127.0.0.1
resources.rediska.servers.0.port = 6379

With the resolution of the issue ZF-7696 this issue too was fixed. Code reproduced: http://pastie.org/1106246