From 65a89024705e333edd79c2a5984491cc2fc251df Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Sun, 19 Sep 2021 10:51:36 -0700 Subject: [PATCH] Deprecate AbstractPlatform::canEmulateSchemas() --- UPGRADE.md | 5 +++++ src/Platforms/AbstractPlatform.php | 8 ++++++++ src/Platforms/SqlitePlatform.php | 8 ++++++++ 3 files changed, 21 insertions(+) diff --git a/UPGRADE.md b/UPGRADE.md index 10becb94a6d..672a88f0335 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -8,6 +8,11 @@ awareness about deprecated code. # Upgrade to 3.2 +## Deprecated `AbstractPlatform::canEmulateSchemas()`. + +The `AbstractPlatform::canEmulateSchemas()` method and the schema emulation implemented in the SQLite platform +have been deprecated. + ## Deprecated `udf*` methods of the `SQLitePlatform` methods. The following `SQLServerPlatform` methods have been deprecated in favor of their implementations diff --git a/src/Platforms/AbstractPlatform.php b/src/Platforms/AbstractPlatform.php index 919a5b904cf..32c8645e4e3 100644 --- a/src/Platforms/AbstractPlatform.php +++ b/src/Platforms/AbstractPlatform.php @@ -3467,6 +3467,8 @@ public function supportsSchemas() /** * Whether this platform can emulate schemas. * + * @deprecated + * * Platforms that either support or emulate schemas don't automatically * filter a schema for the namespaced elements in {@link AbstractManager::createSchema()}. * @@ -3474,6 +3476,12 @@ public function supportsSchemas() */ public function canEmulateSchemas() { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/4805', + 'AbstractPlatform::canEmulateSchemas() is deprecated.' + ); + return false; } diff --git a/src/Platforms/SqlitePlatform.php b/src/Platforms/SqlitePlatform.php index 07dad0cca65..d1aa741b51e 100644 --- a/src/Platforms/SqlitePlatform.php +++ b/src/Platforms/SqlitePlatform.php @@ -800,6 +800,8 @@ public function getTemporaryTableName($tableName) /** * {@inheritDoc} * + * @deprecated + * * Sqlite Platform emulates schema by underscoring each dot and generating tables * into the default database. * @@ -808,6 +810,12 @@ public function getTemporaryTableName($tableName) */ public function canEmulateSchemas() { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/4805', + 'SqlitePlatform::canEmulateSchemas() is deprecated.' + ); + return true; }