Re: [fw-general] PDO_MYSQL vs. Pdo_Mysql ZF 1 .9.3

2009-09-22 Thread Benjamin Eberlei

sorry but that i dont understand.

The factory makes certain assumptions about what is possible
and what not in creating an adapter. Changing the assumptions
is a B/C break.

Of course its a bug that ZendX Firebird cannot be loaded
from the previous assumptions but that is not a valid cause
to overthrow them. There has to be a BC way to solve both cases.

Additionally this is a change in a mini version, breaking
code that was perfectly valid and should still be valid in all
versions from 1.0 to 1.9.2 updates. I cant understand that
reasoning.

greets,
Benjamin

On Tue, 22 Sep 2009 11:46:27 -0400, Matthew Weier O'Phinney
matt...@zend.com wrote:
 -- till klimp...@gmail.com wrote
 (on Tuesday, 22 September 2009, 05:09 PM +0200):
 On Tue, Sep 22, 2009 at 11:39 AM, Jonathan Maron
 jonathan.a.ma...@gmail.com wrote:
  This modification is important to note in ZF 1.9.3:
 
  http://framework.zend.com/issues/browse/ZF-5606
 
  The change will probably break some (older) applications.
 
  Correct:
 
  $db = Zend_Db::factory('Pdo_Mysql', $params);
 
  Incorrect (as of ZF 1.9.3)
 
  $db = Zend_Db::factory('PDO_MYSQL', $params);
 
 I'm just wondering why this was fixed now and not in 2.0?
 
 Because it was leading to other issues.
 
 BC breaks, while regrettable, are allowed if they fix a more fundamental
 issue.


Re: [fw-general] PDO_MYSQL vs. Pdo_Mysql ZF 1 .9.3

2009-09-22 Thread Benjamin Eberlei

a BC change for this bug is simple, just exclude adapterNamespace from
the word-wise ucwords reasoning and append it to the
canonical database adapter name AFTER the changes:

http://framework.zend.com/svn/framework/standard/trunk/library/Zend/Db.php

One should just take the adapter namespace out of the normalizing
procedure:

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

Should be behaviour:
$adapterName = strtolower($adapter);
$adapterName = str_replace(' ', '', ucwords(str_replace('', ' ',
$adapterName))); 
$adapterName = $adapterNamespace._.$adapterName;

This way the BC break is on the Adapter Namespace and not on the Adapter
Name.
But since the Namespace implies that is prepended to the classname
there was the assumption that this had to be written correctly, whereas
the adapter name is said to be case-insensitive from the API docs:

First argument may be a string containing the base of the adapter class
name,
e.g. 'Mysqli' corresponds to class Zend_Db_Adapter_Mysqli. This is
case-insensitive.

Which it is now not anymore!

On Tue, 22 Sep 2009 18:02:12 +0200, Benjamin Eberlei kont...@beberlei.de
wrote:
 sorry but that i dont understand.
 
 The factory makes certain assumptions about what is possible
 and what not in creating an adapter. Changing the assumptions
 is a B/C break.
 
 Of course its a bug that ZendX Firebird cannot be loaded
 from the previous assumptions but that is not a valid cause
 to overthrow them. There has to be a BC way to solve both cases.
 
 Additionally this is a change in a mini version, breaking
 code that was perfectly valid and should still be valid in all
 versions from 1.0 to 1.9.2 updates. I cant understand that
 reasoning.
 
 greets,
 Benjamin
 
 On Tue, 22 Sep 2009 11:46:27 -0400, Matthew Weier O'Phinney
 matt...@zend.com wrote:
 -- till klimp...@gmail.com wrote
 (on Tuesday, 22 September 2009, 05:09 PM +0200):
 On Tue, Sep 22, 2009 at 11:39 AM, Jonathan Maron
 jonathan.a.ma...@gmail.com wrote:
  This modification is important to note in ZF 1.9.3:
 
  http://framework.zend.com/issues/browse/ZF-5606
 
  The change will probably break some (older) applications.
 
  Correct:
 
  $db = Zend_Db::factory('Pdo_Mysql', $params);
 
  Incorrect (as of ZF 1.9.3)
 
  $db = Zend_Db::factory('PDO_MYSQL', $params);
 
 I'm just wondering why this was fixed now and not in 2.0?
 
 Because it was leading to other issues.
 
 BC breaks, while regrettable, are allowed if they fix a more fundamental
 issue.