File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,10 @@ all drivers and middleware.
68
68
69
69
# Upgrade to 4.3
70
70
71
+ ## Deprecated ` AbstractAsset::getShortestName() `
72
+
73
+ The ` AbstractAsset::getShortestName() ` method has been deprecated. Use ` AbstractAsset::getName() ` instead.
74
+
71
75
## Deprecated ` Sequence::isAutoIncrementsFor() `
72
76
73
77
The ` Sequence::isAutoIncrementsFor() ` method has been deprecated.
Original file line number Diff line number Diff line change 62
62
-->
63
63
<referencedMethod name =" Doctrine\DBAL\Schema\AbstractAsset::getNameParser" />
64
64
<referencedMethod name =" Doctrine\DBAL\Schema\AbstractAsset::setName" />
65
+
66
+ <!--
67
+ https://github.com/doctrine/dbal/pull/6657
68
+ TODO: remove in 5.0.0
69
+ -->
70
+ <referencedMethod name =" Doctrine\DBAL\Schema\AbstractAsset::getShortestName" />
65
71
</errorLevel >
66
72
</DeprecatedMethod >
67
73
<DocblockTypeContradiction >
Original file line number Diff line number Diff line change 12
12
use Doctrine \DBAL \Schema \Name \OptionallyQualifiedName ;
13
13
use Doctrine \DBAL \Schema \Name \Parser ;
14
14
use Doctrine \DBAL \Schema \Name \UnqualifiedName ;
15
+ use Doctrine \Deprecations \Deprecation ;
15
16
16
17
use function array_map ;
17
18
use function assert ;
@@ -160,9 +161,18 @@ public function getNamespaceName(): ?string
160
161
/**
161
162
* The shortest name is stripped of the default namespace. All other
162
163
* namespaced elements are returned as full-qualified names.
164
+ *
165
+ * @deprecated Use {@link getName()} instead.
163
166
*/
164
167
public function getShortestName (?string $ defaultNamespaceName ): string
165
168
{
169
+ Deprecation::triggerIfCalledFromOutside (
170
+ 'doctrine/dbal ' ,
171
+ 'https://github.com/doctrine/dbal/pull/6657 ' ,
172
+ '%s is deprecated and will be removed in 5.0. ' ,
173
+ __METHOD__ ,
174
+ );
175
+
166
176
$ shortestName = $ this ->getName ();
167
177
if ($ this ->_namespace === $ defaultNamespaceName ) {
168
178
$ shortestName = $ this ->_name ;
You can’t perform that action at this time.
0 commit comments