You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Historically, the DBAL public API uses PDO constants which creates a hard dependency and makes the abstraction not that abstract. For the end user, it means that even if none of the PDO drivers are going to be used, the production environment still has to have ext-pdo installed.
To eliminate the dependency, the PDO constants in the method signatures should be replaced by the DBAL's own ones:
ResultStatement::fetch() declares support of PDO::FETCH_ORI_* constants. In fact, they are only supported by PDO. Most likely, they are not used anywhere and therefore can be dropped.
Statement::bindParam() declares support of PDO::PARAM_INPUT_OUTPUT. Given it can only be used with stored procedures which the DBAL doesn't support, there's no way it could be used and therefore its support can be dropped.
Please let me know if you know the reason why the functionality defined by those constants should be still supported.
Historically, the DBAL public API uses
PDO
constants which creates a hard dependency and makes the abstraction not that abstract. For the end user, it means that even if none of thePDO
drivers are going to be used, the production environment still has to haveext-pdo
installed.To eliminate the dependency, the
PDO
constants in the method signatures should be replaced by the DBAL's own ones:PDO::PARAM_*
→Doctrine\DBAL\Driver\Statement::PARAM_*
,PDO::FETCH_*
→Doctrine\DBAL\Driver\ResultStatement::FETCH_*
,PDO::CASE_*
→Doctrine\DBAL\Driver\ResultStatement::CASE_*
.It can be done in phases:
2.x
, introduce the new DBAL constants and assign them corresponding PDO values, e.g.Statement::PARAM_INT = PDO::PARAM_INT
.PDO::
constants when calling the DBAL methods.3.0
, replace thePDO
constants with their integer values, e.g.Statement::PARAM_INT = 1
The text was updated successfully, but these errors were encountered: