PHP ext/PDO future

[email protected] (Lukas Kahwe Smith) Sat, 30 Aug 2008 13:31:51 +0200
Newsgroups php.pdo
Message-ID <[email protected]>
Hello All,

I am sure I have asked each of you at some point if you are interested  
in helping out to bring PDO to the next level. The people that I have  
not asked are included because they currently actively maintain some  
PHP RDBMS extension (let me know if I missed anyone). I am also  
including the PDO list because I hope that in case I missed someone  
they are subscribed to this list. The current state is that there  
nobody actively maintaining the core package. Most of the drivers are  
more or less orphaned as well. Some well known RDBMS do not even have  
a driver at this stage. Also most drivers behave quite different, even  
if there is no technical reason for them todo so, aside from the fact  
that there is no easy way to validate how each driver behaves.

The goal of PDO is obviously to make it easy for developers to write  
applications that can run on top of any RDBMS. Well at least the  
client side API should be the same and the most common issues with SQL  
portability (quoting, prepared statements, LOBs, error handling etc.)  
should also be somewhat addressed. I know many people would like to  
expand the scope much further (thinking of a PDBC along the lines of  
JDBC). I do not want to shoot down such visions, but I think even if  
we are to go in that direction, we should take a few intermediate  
steps beforehand.

I tried to compile a list of the current main gripes [1], but the  
biggest one is the lack of an extensive test suite. With a test suite  
we could introduce a compatibility mode, where the differences between  
drivers are reduced. At the very least it would make it possible to  
document where the drivers are different.

The good news is that SUN/MySQL has already started to write a ton of  
tests during the development of their update to PDO_MySQL [2]. However  
these tests obviously assume the default behavior of MySQL. This could  
be a good basis to build upon. Of course that is not to say that we  
need to accept the MySQL default behavior as the way things should  
work in compatibility mode. We can discuss what behavior is most  
easily implementable across as many drivers as possible. Obviously  
such discussions pose the risk that each vendor or a set of vendors  
prefer one way and others another. I hope we can resolve these issues  
in a cooperative fashion. I would rather not have to spend time on  
finding complex decision making processes to handle such disagreements.

Anyways, the time is now imho. We never had so many vendors and single  
developers around that are interested in writing and maintaining RDBMS  
related PHP extensions and that have shown their face in the community  
in one form or another. Also I have increasingly gotten the vibe from  
vendors that they can in fact live without a CLA. So with this effort  
the common PHP development model will be the baseline. If you have  
questions about the legal aspects of the PHP development let me know,  
but please please please do not sabotage this discussion by trying to  
introduce new legal aspects. I am very sure that we are enough people  
to make a difference, even if one vendor in the end has to step back  
from active development because of legal reasons. I sure hope this  
will not be the case, but if it does turn out to be the case, we can  
try to find a solution independent of the big effort (maybe someone in  
the community will step up to fill the gap etc.)

So as a first step, I ask anyone truly interested to waive their  
hands. As a first task I then ask everybody to check out the tests  
that SUN/MySQL wrote [2] and/or make available any further tests that  
exist in private branches you all might have for the maintenance of  
PDO drivers. The test results against different RDBMS will hopefully  
give us a baseline to see where we stand today. I will then probably  
try to organize the results on the PHP.net wiki and we can continue  
from there.

regards,
Lukas Kahwe Smith
[email protected]

[1] http://wiki.php.net/rfc/pdov1
[2] http://blog.ulf-wendel.de/?p=188