Skip to content

Commit 7b6554e

Browse files
committed
[doctrineGH-4132] Add deprecation for AbstractPlatform::fixSchemaElementName
1 parent f33960f commit 7b6554e

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

lib/Doctrine/DBAL/Platforms/AbstractPlatform.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3511,6 +3511,12 @@ public function getSQLResultCasing($column)
35113511
*/
35123512
public function fixSchemaElementName($schemaElementName)
35133513
{
3514+
Deprecation::trigger(
3515+
'doctrine/dbal',
3516+
'https://github.com/doctrine/dbal/pull/4132',
3517+
'AbstractPlatform::fixSchemaElementName is deprecated with no replacement and removed in DBAL 3.0'
3518+
);
3519+
35143520
return $schemaElementName;
35153521
}
35163522

lib/Doctrine/DBAL/Platforms/OraclePlatform.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Doctrine\DBAL\Schema\TableDiff;
1212
use Doctrine\DBAL\TransactionIsolationLevel;
1313
use Doctrine\DBAL\Types\BinaryType;
14+
use Doctrine\Deprecations\Deprecation;
1415
use InvalidArgumentException;
1516

1617
use function array_merge;
@@ -1104,6 +1105,12 @@ public function getTimeFormatString()
11041105
*/
11051106
public function fixSchemaElementName($schemaElementName)
11061107
{
1108+
Deprecation::trigger(
1109+
'doctrine/dbal',
1110+
'https://github.com/doctrine/dbal/pull/4132',
1111+
'AbstractPlatform::fixSchemaElementName is deprecated with no replacement and removed in DBAL 3.0'
1112+
);
1113+
11071114
if (strlen($schemaElementName) > 30) {
11081115
// Trim it
11091116
return substr($schemaElementName, 0, 30);

lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use Doctrine\DBAL\Schema\Table;
1414
use Doctrine\DBAL\Schema\TableDiff;
1515
use Doctrine\DBAL\TransactionIsolationLevel;
16+
use Doctrine\Deprecations\Deprecation;
1617
use InvalidArgumentException;
1718

1819
use function array_merge;
@@ -72,6 +73,12 @@ public function appendLockHint($fromClause, $lockMode)
7273
*/
7374
public function fixSchemaElementName($schemaElementName)
7475
{
76+
Deprecation::trigger(
77+
'doctrine/dbal',
78+
'https://github.com/doctrine/dbal/pull/4132',
79+
'AbstractPlatform::fixSchemaElementName is deprecated with no replacement and removed in DBAL 3.0'
80+
);
81+
7582
$maxIdentifierLength = $this->getMaxIdentifierLength();
7683

7784
if (strlen($schemaElementName) > $maxIdentifierLength) {

0 commit comments

Comments
 (0)