Skip to content
This repository has been archived by the owner on Oct 17, 2018. It is now read-only.

Refactor how driver specific attributes are set #10

Open
downsider opened this issue Mar 29, 2016 · 1 comment
Open

Refactor how driver specific attributes are set #10

downsider opened this issue Mar 29, 2016 · 1 comment

Comments

@downsider
Copy link
Contributor

Due to the stupidity of the PDO group, the constant PDO::MYSQL_ATTR_USE_BUFFERED_QUERIES has the same numeric value as the constant PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT. The latter is deprecated in PHP7 and is throwing warnings

A possible solution is to inject an $options array instead of $useBufferedQueries, which contains arrays of options keyed by the DB driver name (mysql, pgsql,etc...). This would allow for attributes to be set only if they were specific to the drivers.
In this solution, we would also need a default key for attributes that are independant of driver (such as PDO::ATTR_TIMEOUT or PDO::ATTR_PERSISTENT)

@dochne
Copy link
Contributor

dochne commented Mar 29, 2016

Note: This error is being thrown on 5.6, so it isn't just a v7 issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants