From 5e9c74c6cf015e8b01d30c1a57d3db05692bd783 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Fri, 9 Apr 2021 18:35:45 -0700 Subject: [PATCH] [GH-4510] Remove ReservedWordsCommand::setKeywordListClass() --- UPGRADE.md | 4 ++++ psalm.xml.dist | 2 -- .../Console/Command/ReservedWordsCommand.php | 18 ------------------ 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/UPGRADE.md b/UPGRADE.md index 8a0d4a4c3c9..a94fc425312 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -8,6 +8,10 @@ awareness about deprecated code. # Upgrade to 4.0 +## Removed `ReservedWordsCommand::setKeywordListClass()` + +To add or replace a keyword list, use `ReservedWordsCommand::setKeywordList()`. + ## Removed `AbstractPlatform::getReservedKeywordsClass()` Instead of implementing `AbstractPlatform::getReservedKeywordsClass()`, platforms must implement `AbstractPlatform::createReservedKeywordsList()`. The latter has been made abstract. diff --git a/psalm.xml.dist b/psalm.xml.dist index 95e3a1cfd42..82f37d7b94c 100644 --- a/psalm.xml.dist +++ b/psalm.xml.dist @@ -211,8 +211,6 @@ - - diff --git a/src/Tools/Console/Command/ReservedWordsCommand.php b/src/Tools/Console/Command/ReservedWordsCommand.php index 9f4591c8ead..a7456851062 100644 --- a/src/Tools/Console/Command/ReservedWordsCommand.php +++ b/src/Tools/Console/Command/ReservedWordsCommand.php @@ -19,7 +19,6 @@ use Doctrine\DBAL\Platforms\Keywords\SQLiteKeywords; use Doctrine\DBAL\Platforms\Keywords\SQLServer2012Keywords; use Doctrine\DBAL\Tools\Console\ConnectionProvider; -use Doctrine\Deprecations\Deprecation; use InvalidArgumentException; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -69,23 +68,6 @@ public function setKeywordList(string $name, KeywordList $keywordList): void $this->keywordLists[$name] = $keywordList; } - /** - * If you want to add or replace a keywords list use this command. - * - * @param class-string $class - */ - public function setKeywordListClass(string $name, string $class): void - { - Deprecation::trigger( - 'doctrine/dbal', - 'https://github.com/doctrine/dbal/issues/4510', - 'ReservedWordsCommand::setKeywordListClass() is deprecated,' - . ' use ReservedWordsCommand::setKeywordList() instead.' - ); - - $this->keywordLists[$name] = new $class(); - } - protected function configure(): void { $this