Skip to content

Commit

Permalink
Remove AbstractAsset::isIdentifierQuoted()
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Dec 30, 2024
1 parent 464b9ee commit 58ab838
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 31 deletions.
4 changes: 4 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ awareness about deprecated code.

# Upgrade to 5.0

## BC BREAK: Removed `AbstractAsset::isIdentifierQuoted()`

The `AbstractAsset::isIdentifierQuoted()` method has been removed.

## BC BREAK: Disallowed mixing unqualified and qualified names in a schema without a default namespace

If a schema lacks a default namespace configuration and has at least one object with an unqualified name, adding or
Expand Down
12 changes: 0 additions & 12 deletions psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,6 @@
-->
<referencedMethod name="Doctrine\DBAL\Schema\AbstractAsset::getNameParser" />
<referencedMethod name="Doctrine\DBAL\Schema\AbstractAsset::setName" />

<!--
https://github.com/doctrine/dbal/pull/6674
TODO: remove in 5.0.0
-->
<referencedMethod name="Doctrine\DBAL\Schema\AbstractAsset::getQuotedName" />

<!--
https://github.com/doctrine/dbal/pull/6677
TODO: remove in 5.0.0
-->
<referencedMethod name="Doctrine\DBAL\Schema\AbstractAsset::isIdentifierQuoted" />
</errorLevel>
</DeprecatedMethod>
<DocblockTypeContradiction>
Expand Down
19 changes: 0 additions & 19 deletions src/Schema/AbstractAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use Doctrine\DBAL\Schema\Name\OptionallyQualifiedName;
use Doctrine\DBAL\Schema\Name\Parser;
use Doctrine\DBAL\Schema\Name\UnqualifiedName;
use Doctrine\Deprecations\Deprecation;

use function array_map;
use function assert;
Expand Down Expand Up @@ -118,24 +117,6 @@ public function isQuoted(): bool
return $this->_quoted;
}

/**
* Checks if this identifier is quoted.
*
* @deprecated Parse the name and introspect its identifiers individually using {@see Identifier::isQuoted()}
* instead.
*/
protected function isIdentifierQuoted(string $identifier): bool
{
Deprecation::triggerIfCalledFromOutside(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/6677',
'%s is deprecated and will be removed in 5.0.',
__METHOD__,
);

return isset($identifier[0]) && ($identifier[0] === '`' || $identifier[0] === '"' || $identifier[0] === '[');
}

/**
* Trim quotes from the identifier.
*/
Expand Down

0 comments on commit 58ab838

Please sign in to comment.