ZF-4705: Zend_Db::factory() is very strict on the string format for 'adapter' and 'adapterNamespace'


{{Zend_Db::factory()}} uses

$adapterName = strtolower($adapterNamespace . '_' . $adapter);
$adapterName = str_replace(' ', '_', ucwords(str_replace('_', ' ', $adapterName)));

to sanitize the strings given to the method when resolving the full class name of the adapter to load.

Well, now I'm at the point where I must use the string {{UserDb}} as the {{adapter}} and {{ISHD_Auth_Db}} as the {{adapterNamespace}} (ISHD is an acronym like IBM e.g. and should be written all-uppercase). This works quite well on Windows (development) as filenames and directory names are case-insensitive but on *nix (production server) {{Zend_Loader}} fails to load class {{Ishd_Auth_Db_Userdb}} due to its case-sensitivity.

If there is no specific reason why this strict string format {{Abc_Defg_Hijk}} must be enforced, this sanitizing should be removed.

PS: I currently do not know which other ZF components use a similar sanitizing procedure that results in the loss of freedom and flexibility with no apparent benefit.


without the sanitation this should be... bq. {{$adapterName = $adapterNamespace . '_' . $adapter;}}

Duplicates ZF-3154

Fixed with solution in ZF-5606