From 7532e41391238368fae3407edcbef596a73872c5 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Tue, 18 Aug 2020 07:29:06 -0700 Subject: [PATCH] Deprecate the Synchronizer package --- UPGRADE.md | 4 ++++ docs/en/reference/sharding.rst | 4 ++-- .../DBAL/Schema/Synchronizer/AbstractSchemaSynchronizer.php | 2 ++ lib/Doctrine/DBAL/Schema/Synchronizer/SchemaSynchronizer.php | 2 ++ .../DBAL/Schema/Synchronizer/SingleDatabaseSynchronizer.php | 2 ++ 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/UPGRADE.md b/UPGRADE.md index a467b387e5f..6479312d553 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,5 +1,9 @@ # Upgrade to 2.11 +## Deprecated `Synchronizer` package + +The `Doctrine\DBAL\Schema\Synchronizer\SchemaSynchronizer` interface and all its implementations are deprecated. + ## Deprecated usage of wrapper-level components as implementations of driver-level interfaces The usage of the wrapper `Connection` and `Statement` classes as implementations of the `Driver\Connection` and `Driver\Statement` interfaces is deprecated. diff --git a/docs/en/reference/sharding.rst b/docs/en/reference/sharding.rst index 2b2f804da53..8780593a0b6 100644 --- a/docs/en/reference/sharding.rst +++ b/docs/en/reference/sharding.rst @@ -269,8 +269,8 @@ you have to sort the data in the application. $sql = "SELECT * FROM customers"; $rows = $shardManager->queryAll($sql, $params); -Schema Operations: SchemaSynchronizer Interface ------------------------------------------------ +Schema Operations: SchemaSynchronizer Interface (deprecated) +------------------------------------------------------------ Schema Operations in a sharding architecture are tricky. You have to perform them on all databases instances (shards) at the same time. Also Doctrine diff --git a/lib/Doctrine/DBAL/Schema/Synchronizer/AbstractSchemaSynchronizer.php b/lib/Doctrine/DBAL/Schema/Synchronizer/AbstractSchemaSynchronizer.php index 9b1974747e7..7cfd1f2c00f 100644 --- a/lib/Doctrine/DBAL/Schema/Synchronizer/AbstractSchemaSynchronizer.php +++ b/lib/Doctrine/DBAL/Schema/Synchronizer/AbstractSchemaSynchronizer.php @@ -7,6 +7,8 @@ /** * Abstract schema synchronizer with methods for executing batches of SQL. + * + * @deprecated */ abstract class AbstractSchemaSynchronizer implements SchemaSynchronizer { diff --git a/lib/Doctrine/DBAL/Schema/Synchronizer/SchemaSynchronizer.php b/lib/Doctrine/DBAL/Schema/Synchronizer/SchemaSynchronizer.php index 3e7beea7508..a10d3b7f327 100644 --- a/lib/Doctrine/DBAL/Schema/Synchronizer/SchemaSynchronizer.php +++ b/lib/Doctrine/DBAL/Schema/Synchronizer/SchemaSynchronizer.php @@ -7,6 +7,8 @@ /** * The synchronizer knows how to synchronize a schema with the configured * database. + * + * @deprecated */ interface SchemaSynchronizer { diff --git a/lib/Doctrine/DBAL/Schema/Synchronizer/SingleDatabaseSynchronizer.php b/lib/Doctrine/DBAL/Schema/Synchronizer/SingleDatabaseSynchronizer.php index 43c0fc6a544..62a58577780 100644 --- a/lib/Doctrine/DBAL/Schema/Synchronizer/SingleDatabaseSynchronizer.php +++ b/lib/Doctrine/DBAL/Schema/Synchronizer/SingleDatabaseSynchronizer.php @@ -12,6 +12,8 @@ /** * Schema Synchronizer for Default DBAL Connection. + * + * @deprecated */ class SingleDatabaseSynchronizer extends AbstractSchemaSynchronizer {