ZF-10986: Namespace problem with custom adapters
Description
It is not possible to create custom Zend_Db adapters within a custom namespace and create an instance through Zend_Db::factory. Using namespace "My\Zend\Db\Adapter" and adapter name "Pdo\Pgsql Zend_Db::factory tries to create an instance of "My\Zend\Db\Adapter_Pdo\Pgsql" intead of "My\Zend\Db\Adapter\Pdo\Pgsql". This is due to the following code in Zend_Db::factory:
// Adapter no longer normalized- see <a rel="nofollow" href="http://framework.zend.com/issues/browse/ZF-5606">http://framework.zend.com/issues/browse/ZF-5606</a>
$adapterName = $adapterNamespace . '_';
$adapterName .= str_replace(' ', '_', ucwords(str_replace('_', ' ', strtolower($adapter))));
This is valid for 1.11.2 and current trunk as well.
Comments
No comments to display