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
Copy file name to clipboardExpand all lines: UPGRADE.md
+48Lines changed: 48 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,51 @@
1
+
# Upgrade to 3.0
2
+
3
+
## BC BREAK User-provided `PDO` instance is no longer supported
4
+
5
+
In order to share the same `PDO` instances between DBAL and other components, initialize the connection in DBAL and access it using `Connection::getWrappedConnection()->getWrappedConnection()`.
6
+
7
+
## BC BREAK: the PDO symbols are no longer part of the DBAL API
8
+
9
+
1. The support of `PDO::PARAM_*`, `PDO::FETCH_*`, `PDO::CASE_*` and `PDO::PARAM_INPUT_OUTPUT` constants in the DBAL API is removed.
10
+
2.`\Doctrine\DBAL\Driver\PDOConnection` does not extend `\PDO` anymore. Please use `\Doctrine\DBAL\Driver\PDOConnection::getWrappedConnection()` to access the underlying `PDO` object.
11
+
3.`\Doctrine\DBAL\Driver\PDOStatement` does not extend `\PDOStatement` anymore.
12
+
13
+
Before:
14
+
15
+
use Doctrine\DBAL\Portability\Connection;
16
+
17
+
$params = array(
18
+
'wrapperClass' => Connection::class,
19
+
'fetch_case' => PDO::CASE_LOWER,
20
+
);
21
+
22
+
$stmt->bindValue(1, 1, PDO::PARAM_INT);
23
+
$stmt->fetchAll(PDO::FETCH_COLUMN);
24
+
25
+
After:
26
+
27
+
use Doctrine\DBAL\ColumnCase;
28
+
use Doctrine\DBAL\FetchMode;
29
+
use Doctrine\DBAL\ParameterType;
30
+
use Doctrine\DBAL\Portability\Connection;
31
+
32
+
$params = array(
33
+
'wrapperClass' => Connection::class,
34
+
'fetch_case' => ColumnCase::LOWER,
35
+
);
36
+
37
+
$stmt->bindValue(1, 1, ParameterType::INTEGER);
38
+
$stmt->fetchAll(FetchMode::COLUMN);
39
+
40
+
## BC BREAK: Removed dbal:import CLI command
41
+
42
+
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.
43
+
Please use other database client applications for import, e.g.:
44
+
45
+
* For MySQL and MariaDB: `mysql [dbname] < data.sql`.
46
+
* For PostgreSQL: `psql [dbname] < data.sql`.
47
+
* For SQLite: `sqlite3 /path/to/file.db < data.sql`.
0 commit comments