Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request is a spin-off from https://externals.io/message/110578.
What is it trying to achieve?
To provide full functionality there is a need to add driver-specific methods to PDO.
I discovered that I cannot load SQLite extensions such as GIS functions when using PDO-SQLite, and raised this on the mailing list. Rightly, no one wants to add driver-specific functionality to PDO - what's in PDO should be portable.
The consensus is that adding driver-specific subclassing of PDO is the way to go, and driver-specific functionality should be added here.
Why a Pull Request now?
I last wrote C 2 decades ago, and those were simple programs. I'm enjoying the challenge of digging into the PHP source code and doing copy&paste development but I don't know enough to complete this. I'm getting stuck and I need help.
I've been using SQLite as my testbed; if taken forward the work would need scaling to all drivers.
Preliminary plans
PDO::connect()
methodPDO::connect()
do the same asnew PDO()
but return the right driver-instance (PDOSQLite in this case)Far-Future plans
PDO
continue to work