ZF-6658: autoloading issue with the fallback autoloader
Description
I've enabled the fallback autoloader in my application bootstrap.
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { protected function _initFallbackAutoload() { Zend_Loader_Autoloader::getInstance() ->setFallbackAutoloader(true) ; } [...] }
This leads to the following error messages. Warning: include(Module/Bootstrap.php) [function.include]: failed to open stream: No such file or directory in /path/to/library/Zend/Loader.php on line 83
Warning: include() [function.include]: Failed opening 'Module/Bootstrap.php' for inclusion (include_path='/path/to/library:.:/usr/local/lib/php') in /path/to/library/Zend/Loader.php on line 83
Warning: include(FrontController.php) [function.include]: failed to open stream: No such file or directory in /path/to/library/Zend/Loader.php on line 83
Warning: include() [function.include]: Failed opening 'FrontController.php' for inclusion (include_path='/path/to/library:.:/usr/local/lib/php') in /path/to/library/Zend/Loader.php on line 83
But the module bootstrap and the front controller would be loaded.
Comments
Posted by Miroslav Kubelik (koubel) on 2009-06-18T02:10:03.000+0000
I have same problem, I think you have to have also set suppressNotFoundWarnings(false) for "global" autoloader to see this warnings.
Posted by Jurrien Stutterheim (norm2782) on 2009-06-24T21:29:35.000+0000
Could you try and reproduce this issue with 1.8.4? The solution to ZF-7002 might have fixed this.
Posted by Martin Adler (madler) on 2009-06-26T02:38:00.000+0000
Now I have tested this issue against Zend Framework 1.8.4 Release (r16258). It still throws both warnings related to the FrontController.php as explained in the description, but the module bootstrap will be loaded without any warnings now.
Posted by Miroslav Kubelik (koubel) on 2009-06-27T15:29:31.000+0000
I also test it with ZF 1.8.4 (r16258) in real app and I think that everything is OK, no warnings for Module/Bootstrap.php and no for FrontController.php. But there is one problem I think.
At all events, ZF 7002 fixed the Module/Bootstrap.php warnings.
FrontController.php warnings are gone because the front controller resource plugin is initialized in the constructor of Zend_Application_Bootstrap_Bootstrap, this is parent for main boostraps in most situations.
But in situation, when the front controller plugin is initialized only from module bootstrap via code from Zend_Application_Module_Bootstrap constructor:
//ZF-6545: ensure front controller resource is loaded if (!$this->hasPluginResource('FrontController')) { $this->registerPluginResource('FrontController'); }warnings related to FrontController.php can be populated, because code
if (class_exists($plugin)) { ...is used in the Zend_Application_Bootstrap_BootstrapAbstract::getPluginResource() as described in the dependent issue.
But is this situation real - when Zend_Application_Bootstrap_Bootstrap isn't used and Zend_Application_Module_Bootstrap is?
Posted by Miroslav Kubelik (koubel) on 2009-08-06T10:03:01.000+0000
patch to solve this is in ZF-7224
Posted by Matthew Weier O'Phinney (matthew) on 2009-08-06T10:39:39.000+0000
Patch applied in trunk and 1.9 release branch
Posted by Margus Sipria (msipria) on 2009-09-29T01:09:18.000+0000
this bug should be opened again, patch has removed in the favor of ZF-7696