Skip to content

Commit

Permalink
Merge pull request #4597 from morozov/issues/4510
Browse files Browse the repository at this point in the history
[GH-4510] Remove ReservedWordsCommand::setKeywordListClass()
  • Loading branch information
morozov committed Apr 10, 2021
2 parents 2a2943c + 5e9c74c commit 88198d6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
4 changes: 4 additions & 0 deletions UPGRADE.md
Expand Up @@ -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.
Expand Down
2 changes: 0 additions & 2 deletions psalm.xml.dist
Expand Up @@ -211,8 +211,6 @@
</UndefinedClass>
<UnsafeInstantiation>
<errorLevel type="suppress">
<!-- See https://github.com/doctrine/dbal/issues/4510 -->
<file name="src/Tools/Console/Command/ReservedWordsCommand.php"/>
<!-- See https://github.com/doctrine/dbal/issues/4511 -->
<file name="src/DriverManager.php"/>
</errorLevel>
Expand Down
18 changes: 0 additions & 18 deletions src/Tools/Console/Command/ReservedWordsCommand.php
Expand Up @@ -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;
Expand Down Expand Up @@ -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<KeywordList> $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
Expand Down

0 comments on commit 88198d6

Please sign in to comment.