ZF-8333: Zend_Validate::is() should not fall back to Zend_Loader::loadClass
Currently Zend_Validate::is() checks if validator class exists using class_exists($className). If it doesn't then Zend_Validate::is() falls back to the Zend_Loader::loadClass($className). This behavior generates "Failed opening" warnings if multiple namespaces are used.
Sample code: Zend_Validate::is("2009-01-01", 'Date', array(),array('FirstNamespace', 'SecondNamespace'))
Result: Warning: include() [function.include]: Failed opening 'FirstNamespace/Date.php' for inclusion (include_path='...') in ZendFramework-1.9.5/library/Zend/Loader.php on line 83
My opinion is that Zend_Validate::is() should not fall back to the Zend_Loader::loadClass, since all namespaces (since ZF 1.8 as far as I remember) must have all respective namespace loaders registered via the Zend_Loader_Autoloader->pushAutoloader method.
When the validator class is not defined after all namespaces are checked then "Validate class not found from basename '$classBaseName'" exception sould be generated.
To sum up: In my opinion it's class_exists (via namespace loaders) job to load desired validator class.