ZF-7967: Inconsistent letter cases for resources (application bootstrapping)


The way the application bootstrapper handles resources seems way inconsistent and badly documented. The front controller has to be defined (in application.ini) as resource.frontController (big C) but e.g. a custom error handler resource can be defined as "errorhandler". As the class shipped by the framework is called "Frontcontroller" it should be addressed as "resource.frontcontroller" in the application.ini

All this caseing ran me into big trouble when switching a working test-app from a windows box (case-insensitive) to a linux box (case-sensitive) as the system didn't find the files but also switched the internal order of the plugins to load.

Tested against the SVN checkout rev 18431, checked out today.

Sorry if the bug description lacks of some info, I'm a native German speaker and thus can't always express me perfectly. Feel free to mail me if you need code samples or other informations.


This is really annoying as frontController resource cannot be overwritten!

guilty code line is here: ZFv1.11.11: Zend_Application_Bootstrap_BootstrapAbstract::_loadPluginResource(): $className = $this->getPluginLoader()->load(strtolower($resource), false);

There should be no call to strtolower. Because of this call, all plugin resources must be named with a capital letter at first and only lower case letters after that. => I could not manage to load my plugin resource named 'MailBox' because of that; it cost me 1h of debugging to find the guilty line and I am forced to name my resource plugin "Mailbox". It also highlight the fact that FrontController resource cannot be easily overloaded because of this call to strtolower.

Changing this at this time is non-trivial, non-backwards compatible, and introduces performance overhead, unfortunately -- and this is in fact a major reason behind changes to plugin loading for 2.0.

Marking as won't fix, as we've already identified the changes needed, and do not feel we can apply them in the 1.X series. Since Zend_Application and the application resources are not used in 2.0, there will be no fix for the next major version.