...
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 should not have been committed
(see bug 49521). This changed the behaviour of PDO so that an object's
constructor is called before the properties from the database fields are
set.
The behaviour requested in bug 49521 was possible already with
PDO_FETCH_PROPS_LATE, and indeed this commit renders that flag
completely useless. You should also note that this flag is still
checked, for no apparent reason, in the code.
Several PHP tickets about the same issue have been closed as bogus
before this one was committed. See 43717 and 37134, especially the
closing comment on the latter, "This is expected, to allow people to
access the data from the query within the [constructor] ..."
Unfortunately this commit has now made into two releases, 5.2.12 and
5.3.1, and has broken our software. We relied on the behaviour (the
expected behaviour) to have properties set (using magic __set) before
the constructor was called, to determine what data came from the DB, and
what data has been updated since.
Revision 290786 seems to have been committed with insufficient thought
put in to what was being done, especially given that it was committed
only 4 days before release. Now we don't have a choice in how PDO
constructs objects, as we did before with the FETCH_PROPS_LATE flag.
There were even tests checking that the constructor was called last, the
tests were changed rather than questioning whether the existing
behaviour was correct. Not to mention a significant behavioural change
to PDO being pushed into a minor release, again, 4 days before release.
Part of the problem is that it doesn't seem well documented (if at all)
that setting the properties before calling the contructor is the
intended and correct behaviour. Or rather, was.
Thanks kindly,
Matt Read
Michael Twofish
Richard Cockrum
Luke Giuliani
> --
> To post to this group, send email to habar...@googlegroups.com
> To unsubscribe from this group, send email to habari-dev-...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/habari-dev
--
Rich Bowen
rbo...@rcbowen.com
+1. I second Rich's comments: send this sooner, rather than later, to
ensure the wider discussion gets started.
I would correct Michael's surname though which conflicts with the
professional tone of the letter.
On Jan 15, 4:26 am, "Chris J. Davis" <chrisdmi...@gmail.com> wrote:
> Same here, looks fine to me, shoot it off.
>
>
>
> On Thu, Jan 14, 2010 at 8:42 PM, Scott Merrill <ski...@skippy.net> wrote:
Ha! I didn't even notice :)
--
Michael C. Harris, School of CS&IT, RMIT University
http://twofishcreative.com/michael/blog
IRC: michaeltwofish #habari
> --
> To post to this group, send email to habar...@googlegroups.com
> To unsubscribe from this group, send email to habari-dev-...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/habari-dev
>
--
Matt Read
http://mattread.info
http://mattread.com