Skip to content

Commit

Permalink
[doctrineGH-4229] Trigger deprecation for more AbstractPlatform depre…
Browse files Browse the repository at this point in the history
…cations.
  • Loading branch information
beberlei committed Mar 6, 2021
1 parent 6b291ac commit 19422a2
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -2670,6 +2670,12 @@ public function getColumnCollationDeclarationSQL($collation)
*/
public function prefersSequences()
{
Deprecation::trigger(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/4229',
'AbstractPlatform::prefersSequences() is deprecated without replacement and removed in DBAL 3.0'
);

return false;
}

Expand Down Expand Up @@ -3241,6 +3247,12 @@ public function supportsForeignKeyConstraints()
*/
public function supportsForeignKeyOnUpdate()
{
Deprecation::trigger(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/4229',
'AbstractPlatform::supportsForeignKeyOnUpdate() is deprecated without replacement and removed in DBAL 3.0'
);

return $this->supportsForeignKeyConstraints();
}

Expand Down Expand Up @@ -3496,6 +3508,13 @@ public function supportsLimitOffset()
*/
public function getSQLResultCasing($column)
{
Deprecation::trigger(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/4229',
'AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.' .
'Use Portability\Connection with PORTABILITY_FIX_CASE to get portable result cases.'
);

return $column;
}

Expand Down
12 changes: 12 additions & 0 deletions lib/Doctrine/DBAL/Platforms/OraclePlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,12 @@ protected function getRenameIndexSQL($oldIndexName, Index $index, $tableName)
*/
public function prefersSequences()
{
Deprecation::trigger(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/4229',
'AbstractPlatform::prefersSequences() is deprecated without replacement and removed in DBAL 3.0'
);

return true;
}

Expand Down Expand Up @@ -1142,6 +1148,12 @@ public function supportsSequences()
*/
public function supportsForeignKeyOnUpdate()
{
Deprecation::trigger(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/4229',
'AbstractPlatform::supportsForeignKeyOnUpdate() is deprecated without replacement and removed in DBAL 3.0'
);

return false;
}

Expand Down
7 changes: 7 additions & 0 deletions lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Doctrine\DBAL\Types\BlobType;
use Doctrine\DBAL\Types\IntegerType;
use Doctrine\DBAL\Types\Type;
use Doctrine\Deprecations\Deprecation;
use UnexpectedValueException;

use function array_diff;
Expand Down Expand Up @@ -215,6 +216,12 @@ public function supportsCommentOnStatement()
*/
public function prefersSequences()
{
Deprecation::trigger(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/4229',
'AbstractPlatform::prefersSequences() is deprecated without replacement and removed in DBAL 3.0'
);

return true;
}

Expand Down

0 comments on commit 19422a2

Please sign in to comment.