On Tue, 26 Jan 2010, Johannes Schlüter wrote: > On Fri, 2010-01-15 at 20:54 -0500, Matt Read wrote: > > We are developers from the Habari Project, an open source PHP blogging > > application; We would like to raise concern with a recent change to the > > logic of PDO. > > > > We believe that PHP's revision 290786 [1] should not have been committed > > (see bug 49521 [2]). This changed the behaviour of PDO so that an > > object's constructor is called before the properties from the database > > fields are set. > > Any more comments on this one? - The more I think Matt is right on this > one especially as the PROPS_LATE constant exists in this case. > > We have two similar cases: > > in regards to tidy: > http://svn.php.net/viewvc?view=revision&revision=292620 > and in regards to mysqli: > http://svn.php.net/viewvc?view=revision&revision=293039 > > A problem with these changes is that the old behavior made it possible > to do further object initialization once the data had been provided by > using a constructor. With the new code the user has to add an "init" > method of some kind which is called after fetching the data as > object ... > > The old behavior might be wrong from an OO-puristic point of view, but > that isn't fixed, actually as the properties are still randomly set. > > I think best is to revert these 3 changes from 5.2, 5.3 and trunk and > make it clearer in the docs.
Yup, I agree. Derick -- http://derickrethans.nl | http://xdebug.org twitter: @derickr
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php