Skip to content

Commit 5f90dbf

Browse files
committed
Merge branch '4.4.x' into 5.0.x
2 parents d34257e + 8ee99fb commit 5f90dbf

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

UPGRADE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,17 @@ all drivers and middleware.
352352

353353
# Upgrade to 4.4
354354

355+
## Deprecated `AbstractAsset::isQuoted()`
356+
357+
The `AbstractAsset::isQuoted()` method has been deprecated. The recommended approach depends on the object class:
358+
359+
1. Get the object name using `NamedObject::getObjectName()` or `OptionallyNamedObject::getObjectName()`.
360+
2. Depending on the type of the name, use one or a combination of the following methods to get the identifier(s):
361+
- For unqualified names, use `UnqualifiedName::getIdentifier()`
362+
- For optionally qualified names, use `OptionallyQualifiedName::getQualifier()` and/or
363+
`OptionallyQualifiedName::getUnqualifiedName()`.
364+
3. Use `Identifier::isQuoted()` to check if corresponding identifier(s) is (are) quoted.
365+
355366
## Deprecated `service` connection parameter for `oci8` and `pdo_oci` connections.
356367

357368
Using the `service` connection parameter to indicate that the value of the `dbname` parameter is the service name has

src/Schema/AbstractAsset.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Doctrine\DBAL\Schema\Name\OptionallyQualifiedName;
1212
use Doctrine\DBAL\Schema\Name\Parser;
1313
use Doctrine\DBAL\Schema\Name\UnqualifiedName;
14+
use Doctrine\Deprecations\Deprecation;
1415

1516
use function array_map;
1617
use function assert;
@@ -37,6 +38,7 @@ abstract class AbstractAsset
3738
{
3839
protected string $_name = '';
3940

41+
/** @deprecated */
4042
protected bool $_quoted = false;
4143

4244
/** @var list<Identifier> */
@@ -111,9 +113,22 @@ protected function setName(?Name $name): void
111113

112114
/**
113115
* Checks if this asset's name is quoted.
116+
*
117+
* @deprecated Depending on the concrete class of the object, use {@see NamedObject::getObjectName()} or
118+
* {@see OptionallyNamedObject::getObjectName()} to get the name. Then, depending on the type of the
119+
* name, use {@see UnqualifiedName::getIdentifier()}, {@see OptionallyQualifiedName::getQualifier()},
120+
* or {@see OptionallyQualifiedName::getUnqualifiedName()} to get the corresponding identifiers. Then,
121+
* use {@see Identifier::$isQuoted()}.
114122
*/
115123
public function isQuoted(): bool
116124
{
125+
Deprecation::triggerIfCalledFromOutside(
126+
'doctrine/dbal',
127+
'https://github.com/doctrine/dbal/pull/7084',
128+
'%s is deprecated and will be removed in 5.0.',
129+
__METHOD__,
130+
);
131+
117132
return $this->_quoted;
118133
}
119134

0 commit comments

Comments
 (0)