Skip to content

Commit

Permalink
Merge branch '3.5.x' into 4.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Oct 22, 2022
2 parents 2e5aa74 + b66f55c commit af7d612
Show file tree
Hide file tree
Showing 44 changed files with 508 additions and 530 deletions.
19 changes: 14 additions & 5 deletions .doctrine-project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,24 @@
"slug": "dbal",
"docsSlug": "doctrine-dbal",
"versions": [
{
"name": "4.0",
"branchName": "4.0.x",
"slug": "latest",
"upcoming": true
},
{
"name": "3.5",
"branchName": "3.5.x",
"slug": "3.5",
"upcoming": true
},
{
"name": "3.4",
"branchName": "3.4.x",
"slug": "latest",
"slug": "current",
"current": true,
"aliases": [
"current",
"stable"
]
"aliases": ["stable"]
},
{
"name": "3.3",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,11 @@ jobs:
- "8.1"
postgres-version:
- "10"
- "13"
- "14"
- "15"
include:
- php-version: "8.2"
postgres-version: "14"
postgres-version: "15"

services:
postgres:
Expand Down
63 changes: 63 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,67 @@ The following methods have been removed.

# Upgrade to 3.5

## Deprecated extension via Doctrine Event Manager

Extension of the library behavior via Doctrine Event Manager has been deprecated.

The following methods and properties have been deprecated:
- `AbstractPlatform::$_eventManager`,
- `AbstractPlatform::getEventManager()`,
- `AbstractPlatform::setEventManager()`,
- `Connection::$_eventManager`,
- `Connection::getEventManager()`.

## Deprecated extension via connection events

Subscription to the `postConnect` event has been deprecated. Use one of the following replacements for the standard
event listeners or implement a custom middleware instead.

The following `postConnect` event listeners have been deprecated:
1. `OracleSessionInit`. Use `Doctrine\DBAL\Driver\OCI8\Middleware\InitializeSession`.
2. `SQLiteSessionInit`. Use `Doctrine\DBAL\Driver\AbstractSQLiteDriver\Middleware\EnableForeignKeys`.
3. `SQLSessionInit`. Implement a custom middleware.

## Deprecated extension via transaction events

Subscription to the following events has been deprecated:
- `onTransactionBegin`,
- `onTransactionCommit`,
- `onTransactionRollBack`.

The upgrade path will depend on the use case:
1. If you need to extend the behavior of only the actual top-level transactions (not the ones emulated via savepoints),
implement a driver middleware.
2. If you need to extend the behavior of the top-level and nested transactions, either implement a driver middleware
or implement a custom wrapper connection.

## Deprecated extension via schema definition events

Subscription to the following events has been deprecated:
- `onSchemaColumnDefinition`,
- `onSchemaIndexDefinition`.

Use a custom schema manager instead.

## Deprecated extension via schema manipulation events

Subscription to the following events has been deprecated:
- `onSchemaCreateTable`,
- `onSchemaCreateTableColumn`,
- `onSchemaDropTable`,
- `onSchemaAlterTable`,
- `onSchemaAlterTableAddColumn`,
- `onSchemaAlterTableRemoveColumn`,
- `onSchemaAlterTableChangeColumn`,
- `onSchemaAlterTableRenameColumn`.

The upgrade path will depend on the use case:
1. If you are using the events to modify the behavior of the platform, you should extend the platform class
and implement the corresponding logic in the sub-class.
2. If you are using the events to modify the arguments processed by the platform (e.g. modify the table definition
before the platform generates the `CREATE TABLE` DDL), you should do the needed modifications before calling
the corresponding platform or schema manager method.

## Deprecated the emulation of the `LOCATE()` function for SQLite

Relying on the availability of the `LOCATE()` on SQLite deprecated. SQLite does not provide that function natively,
Expand Down Expand Up @@ -1118,6 +1179,8 @@ Bind parameters using `Statement::bindParam()` or `Statement::bindValue()` inste
1. The `QueryBuilder::getState()` method has been deprecated as the builder state is an internal concern.
2. Relying on the type of the query being built by using `QueryBuilder::getType()` has been deprecated.
If necessary, track the type of the query being built outside of the builder.
3. The `QueryBuilder::getConnection()` method has been deprecated. Use the connection used to instantiate the builder
instead.

The following `QueryBuilder` constants related to the above methods have been deprecated:

Expand Down
1 change: 0 additions & 1 deletion ci/github/phpunit/oci8.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<var name="db_password" value="oracle"/>
<var name="db_dbname" value="XE"/>
<var name="db_charset" value="AL32UTF8" />
<var name="db_event_subscribers" value="Doctrine\DBAL\Event\Listeners\OracleSessionInit"/>

<var name="tmpdb_driver" value="oci8"/>
<var name="tmpdb_host" value="localhost"/>
Expand Down
1 change: 0 additions & 1 deletion ci/github/phpunit/pdo_oci.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<var name="db_password" value="oracle"/>
<var name="db_dbname" value="XE"/>
<var name="db_charset" value="AL32UTF8" />
<var name="db_event_subscribers" value="Doctrine\DBAL\Event\Listeners\OracleSessionInit"/>

<var name="tmpdb_driver" value="pdo_oci"/>
<var name="tmpdb_host" value="localhost"/>
Expand Down
1 change: 0 additions & 1 deletion ci/github/phpunit/pdo_sqlite.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

<var name="db_driver" value="pdo_sqlite"/>
<var name="db_memory" value="true"/>
<var name="db_event_subscribers" value="Doctrine\DBAL\Event\Listeners\SQLiteSessionInit"/>
</php>

<testsuites>
Expand Down
1 change: 0 additions & 1 deletion ci/github/phpunit/sqlite3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

<var name="db_driver" value="sqlite3"/>
<var name="db_memory" value="true"/>
<var name="db_event_subscribers" value="Doctrine\DBAL\Event\Listeners\SQLiteSessionInit"/>
</php>

<testsuites>
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@
"require-dev": {
"doctrine/coding-standard": "10.0.0",
"jetbrains/phpstorm-stubs": "2022.2",
"phpstan/phpstan": "1.8.8",
"phpstan/phpstan": "1.8.10",
"phpstan/phpstan-phpunit": "1.1.1",
"phpstan/phpstan-strict-rules": "^1.4",
"phpunit/phpunit": "9.5.25",
"psalm/plugin-phpunit": "0.17.0",
"squizlabs/php_codesniffer": "3.7.1",
"symfony/cache": "^5.4|^6.0",
"symfony/console": "^4.4.30|^5.4|^6.0",
"vimeo/psalm": "4.28.0"
"vimeo/psalm": "4.29.0"
},
"suggest": {
"symfony/console": "For helpful console commands such as SQL execution and import of files."
Expand Down
Loading

0 comments on commit af7d612

Please sign in to comment.