Skip to content

Commit

Permalink
Merge pull request #4805 from morozov/deprecate-can-emulate-schemas
Browse files Browse the repository at this point in the history
Deprecate AbstractPlatform::canEmulateSchemas()
  • Loading branch information
morozov authored Sep 19, 2021
2 parents 4221163 + 65a8902 commit ba3e2f7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions src/Platforms/AbstractPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -3467,13 +3467,21 @@ 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()}.
*
* @return bool
*/
public function canEmulateSchemas()
{
Deprecation::trigger(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/4805',
'AbstractPlatform::canEmulateSchemas() is deprecated.'
);

return false;
}

Expand Down
8 changes: 8 additions & 0 deletions src/Platforms/SqlitePlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -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;
}

Expand Down

0 comments on commit ba3e2f7

Please sign in to comment.