ZF-7365: Zend_Application_Bootstrap_BootstrapAbstract lower case names convert plugins and array_key_exists
Description
Look at BootStrapAbstract.php function : public function getPluginResource($resource) code: if (array_key_exists(strtolower($resource), $this->_pluginResources)) {
var_dump(strtolower($resource)) = "layout211_resource_layout"
but in the var_dump( $this->_pluginResources) = "Layout211_Resource_Layout" it still as original
Look at PluginLoader.php function: public function setOptions(array $options) code: $options = array_change_key_case($options, CASE_LOWER);
And strlower conversion problem in function: protected function _loadPluginResource($resource, $options) code: $className = $this->getPluginLoader()->load(strtolower($resource), false);
This code convert only first line in array.
If i set Resource name as :
$application->setOptions( $application->mergeOptions( $application->getOptions(), array( 'pluginPaths'=> array( 'Layout211_Resource_Layout'=> APPLICATION_PATH .'/resource' ), 'resources' => array( 'Layout211_Resource_Layout' => array() ) ) ) );
Comments
Posted by Sylvain Bernier (sb_demarque) on 2012-03-30T15:04:49.000+0000
It might not be the best issue description in the world, but there is definitely case consistency issues with plugin resource names in Zend_Application_Bootstrap_BootstrapAbstract. I am battling them right now, in Zend Framework 1.11.11.
Quick example case:
I have seen many inconsistencies with how $this->_pluginResources is handled in Zend_Application_Bootstrap_BootstrapAbstract. Please review all accesses to $this->_pluginResources and make sure that they are always either case sensitive or not.
Feel free to ask questions about the problem, there is definitely some things to fix in there. Thanks!