8000 Unlike other drivers, DBAL has a hard dependency on PDO · Issue #2953 · doctrine/dbal · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Unlike other drivers, DBAL has a hard dependency on PDO #2953
Closed
@morozov

Description

@morozov

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:

  1. PDO::PARAM_*Doctrine\DBAL\Driver\Statement::PARAM_*,
  2. PDO::FETCH_*Doctrine\DBAL\Driver\ResultStatement::FETCH_*,
  3. PDO::CASE_*Doctrine\DBAL\Driver\ResultStatement::CASE_*.

It can be done in phases:

  1. In 2.x, introduce the new DBAL constants and assign them corresponding PDO values, e.g. Statement::PARAM_INT = PDO::PARAM_INT.
  2. Deprecate the usage of PDO:: constants when calling the DBAL methods.
  3. In 3.0, replace the PDO constants with their integer values, e.g. Statement::PARAM_INT = 1
  4. Remove the dependency.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0