Skip to content

Commit

Permalink
[doctrineGH-2958] Updated UPGRADE.md
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Dec 30, 2019
1 parent 4e8f3b6 commit 9a7fc25
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Upgrade to 3.0

## BC BREAK: the PDO symbols are no longer part of the DBAL API

1. The support of `PDO::PARAM_*`, `PDO::FETCH_*`, `PDO::CASE_*` and `PDO::PARAM_INPUT_OUTPUT` constants in the DBAL API is removed.
2. `\Doctrine\DBAL\Driver\PDOStatement` does not extend `\PDOStatement` anymore.

Before:

use Doctrine\DBAL\Portability\Connection;

$params = array(
'wrapperClass' => Connection::class,
'fetch_case' => PDO::CASE_LOWER,
);

$stmt->bindValue(1, 1, PDO::PARAM_INT);
$stmt->fetchAll(PDO::FETCH_COLUMN);

After:

use Doctrine\DBAL\ColumnCase;
use Doctrine\DBAL\FetchMode;
use Doctrine\DBAL\ParameterType;
use Doctrine\DBAL\Portability\Connection;

$params = array(
'wrapperClass' => Connection::class,
'fetch_case' => ColumnCase::LOWER,
);

$stmt->bindValue(1, 1, ParameterType::INTEGER);
$stmt->fetchAll(FetchMode::COLUMN);

## BC BREAK: Removed dbal:import CLI command

The `dbal:import` CLI command has been removed since it only worked with PDO-based drivers by relying on a non-documented behavior of the extension, and it was impossible to make it work with other drivers.
Expand Down

0 comments on commit 9a7fc25

Please sign in to comment.