Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the APIs deprecated in DBAL 3.x #5438

Merged
merged 3 commits into from
Jun 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,32 @@ awareness about deprecated code.

# Upgrade to 4.0

## BC BREAK: removed Schema Visitor API.

The following interfaces and classes have been removed:

1. `Doctrine\DBAL\Schema\Visitor`,
2. `Doctrine\DBAL\Schema\NamespaceVisitor`,
3. `Doctrine\DBAL\Schema\AbstractVisitor`.

The following methods have been removed:

1. `Doctrine\DBAL\Schema\Schema::visit()`,
2. `Doctrine\DBAL\Schema\Table::visit()`,
3. `Doctrine\DBAL\Schema\Sequence::visit()`.

## BC BREAK: removed `RemoveNamespacedAssets`.

The `RemoveNamespacedAssets` schema visitor has been removed.

## BC BREAK: removed the functionality of checking schema for the usage of reserved keywords.

The following components have been removed:

1. The `dbal:reserved-words` console command.
2. The `ReservedWordsCommand` and `ReservedKeywordsValidator` classes.
3. The `KeywordList::getName()` method.

## BC BREAK: removed `AbstractPlatform::supportsForeignKeyConstraints()`.

The `AbstractPlatform::supportsForeignKeyConstraints()` method has been removed.
Expand Down Expand Up @@ -533,7 +559,6 @@ Table columns are no longer indexed by column name. Use the `name` attribute of
- Class `Doctrine\DBAL\Cache\ResultCacheStatement` was made final.
- Class `Doctrine\DBAL\Cache\ArrayStatement` was made final.
- Class `Doctrine\DBAL\Schema\Synchronizer\SingleDatabaseSynchronizer` was made final.
- Class `Doctrine\DBAL\Schema\Visitor\RemoveNamespacedAssets` was made final.
- Class `Doctrine\DBAL\Portability\Statement` was made final.

## BC BREAK: Changes in the `Doctrine\DBAL\Schema` API
Expand Down
37 changes: 0 additions & 37 deletions psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -40,33 +40,6 @@
<file name="src/Driver/OCI8/ConvertPositionalToNamedPlaceholders.php"/>
</errorLevel>
</ConflictingReferenceConstraint>
<DeprecatedClass>
<errorLevel type="suppress">
<!--
TODO: remove in 4.0.0
-->
<referencedClass name="Doctrine\DBAL\Platforms\Keywords\ReservedKeywordsValidator"/>
<referencedClass name="Doctrine\DBAL\Tools\Console\Command\ReservedWordsCommand"/>
<!--
TODO: remove in 4.0.0
-->
<referencedClass name="Doctrine\DBAL\Schema\Visitor\RemoveNamespacedAssets"/>
<!--
TODO: remove in 4.0.0
-->
<referencedClass name="Doctrine\DBAL\Schema\Visitor\AbstractVisitor"/>
<referencedClass name="Doctrine\DBAL\Schema\Visitor\Visitor"/>
</errorLevel>
</DeprecatedClass>
<DeprecatedInterface>
<errorLevel type="suppress">
<!--
TODO: remove in 4.0.0
-->
<referencedClass name="Doctrine\DBAL\Schema\Visitor\Visitor"/>
<referencedClass name="Doctrine\DBAL\Schema\Visitor\NamespaceVisitor"/>
</errorLevel>
</DeprecatedInterface>
<DeprecatedMethod>
<errorLevel type="suppress">
<!--
Expand All @@ -78,16 +51,6 @@
TODO: remove in 4.0.0
-->
<referencedMethod name="Doctrine\DBAL\Platforms\AbstractPlatform::getListTablesSQL"/>
<!--
TODO: remove in 4.0.0
-->
<referencedMethod name="Doctrine\DBAL\Platforms\Keywords\KeywordList::getName"/>
<!--
TODO: remove in 4.0.0
-->
<referencedMethod name="Doctrine\DBAL\Schema\Schema::visit"/>
<referencedMethod name="Doctrine\DBAL\Schema\Sequence::visit"/>
<referencedMethod name="Doctrine\DBAL\Schema\Table::visit"/>
</errorLevel>
</DeprecatedMethod>
<DocblockTypeContradiction>
Expand Down
16 changes: 0 additions & 16 deletions src/Platforms/Keywords/DB2Keywords.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,11 @@

namespace Doctrine\DBAL\Platforms\Keywords;

use Doctrine\Deprecations\Deprecation;

/**
* DB2 Keywords.
*/
class DB2Keywords extends KeywordList
{
/**
* @deprecated
*/
public function getName(): string
{
Deprecation::triggerIfCalledFromOutside(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/5433',
'DB2Keywords::getName() is deprecated.'
);

return 'DB2';
}

/**
* {@inheritdoc}
*/
Expand Down
7 changes: 0 additions & 7 deletions src/Platforms/Keywords/KeywordList.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,4 @@ protected function initializeKeywords(): void
* @return string[]
*/
abstract protected function getKeywords(): array;

/**
* Returns the name of this keyword list.
*
* @deprecated
*/
abstract public function getName(): string;
}
16 changes: 0 additions & 16 deletions src/Platforms/Keywords/MariaDBKeywords.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,8 @@

namespace Doctrine\DBAL\Platforms\Keywords;

use Doctrine\Deprecations\Deprecation;

class MariaDBKeywords extends MySQLKeywords
{
/**
* @deprecated
*/
public function getName(): string
{
Deprecation::triggerIfCalledFromOutside(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/5433',
'MariaDBKeywords::getName() is deprecated.'
);

return 'MariaDB';
}

/**
* {@inheritdoc}
*/
Expand Down
16 changes: 0 additions & 16 deletions src/Platforms/Keywords/MySQL80Keywords.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,13 @@

namespace Doctrine\DBAL\Platforms\Keywords;

use Doctrine\Deprecations\Deprecation;

use function array_merge;

/**
* MySQL 8.0 reserved keywords list.
*/
class MySQL80Keywords extends MySQLKeywords
{
/**
* @deprecated
*/
public function getName(): string
{
Deprecation::triggerIfCalledFromOutside(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/5433',
'MySQL80Keywords::getName() is deprecated.'
);

return 'MySQL80';
}

/**
* {@inheritdoc}
*
Expand Down
16 changes: 0 additions & 16 deletions src/Platforms/Keywords/MySQLKeywords.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,11 @@

namespace Doctrine\DBAL\Platforms\Keywords;

use Doctrine\Deprecations\Deprecation;

/**
* MySQL Keywordlist.
*/
class MySQLKeywords extends KeywordList
{
/**
* @deprecated
*/
public function getName(): string
{
Deprecation::triggerIfCalledFromOutside(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/5433',
'MySQLKeywords::getName() is deprecated.'
);

return 'MySQL';
}

/**
* {@inheritdoc}
*
Expand Down
16 changes: 0 additions & 16 deletions src/Platforms/Keywords/OracleKeywords.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,11 @@

namespace Doctrine\DBAL\Platforms\Keywords;

use Doctrine\Deprecations\Deprecation;

/**
* Oracle Keywordlist.
*/
class OracleKeywords extends KeywordList
{
/**
* @deprecated
*/
public function getName(): string
{
Deprecation::triggerIfCalledFromOutside(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/5433',
'OracleKeywords::getName() is deprecated.'
);

return 'Oracle';
}

/**
* {@inheritdoc}
*/
Expand Down
16 changes: 0 additions & 16 deletions src/Platforms/Keywords/PostgreSQLKeywords.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,11 @@

namespace Doctrine\DBAL\Platforms\Keywords;

use Doctrine\Deprecations\Deprecation;

/**
* Reserved keywords list corresponding to the PostgreSQL database platform of the oldest supported version.
*/
class PostgreSQLKeywords extends KeywordList
{
/**
* @deprecated
*/
public function getName(): string
{
Deprecation::triggerIfCalledFromOutside(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/5433',
'PostgreSQLKeywords::getName() is deprecated.'
);

return 'PostgreSQL';
}

/**
* {@inheritdoc}
*/
Expand Down
117 changes: 0 additions & 117 deletions src/Platforms/Keywords/ReservedKeywordsValidator.php

This file was deleted.

Loading