Zend Framework

If frontController resource not present in application.ini bootstrap initialize exists class with resource name

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9.4
  • Fix Version/s: 1.10.5
  • Component/s: Zend_Application
  • Labels:
    None

Description

application.ini
[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
Bootstarping
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!

Issue Links

Activity

Hide
Dolf Schimmel (Freeaqingme) added a comment -

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

Show
Dolf Schimmel (Freeaqingme) added a comment - What is the actual outcome, and what outcome were you expecting?
Hide
Ivan Shumkov added a comment -

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:

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
Show
Ivan Shumkov added a comment - 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:
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
Hide
Ramon Henrique Ornelas added a comment -

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

Show
Ramon Henrique Ornelas added a comment - With the resolution of the issue ZF-7696 this issue too was fixed. Code reproduced: http://pastie.org/1106246

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: