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

Deprecate support for MySQL 5.6 and older #5072

Merged
merged 1 commit into from
Dec 2, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ following methods are deprecated:
The protected property `AbstractPlatform::$doctrineTypeComments` is deprecated
as well.

## Deprecated support for MySQL 5.6 and older

MySQL 5.6 and older won't be actively supported in DBAL 4. Consider upgrading to MySQL 5.7 or later.
The following classes have been deprecated:

* `Doctrine\DBAL\Platforms\MySQL57Platform`
* `Doctrine\DBAL\Platforms\Keywords\MySQL57Keywords`

## Deprecated support for Postgres 9

Postgres 9 won't be actively supported in DBAL 4. Consider upgrading to Postgres 10 or later.
Expand Down
2 changes: 2 additions & 0 deletions psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@
<!--
TODO: remove in 4.0.0
-->
<referencedClass name="Doctrine\DBAL\Platforms\Keywords\MySQL57Keywords"/>
<referencedClass name="Doctrine\DBAL\Platforms\Keywords\PostgreSQL100Keywords"/>
<referencedClass name="Doctrine\DBAL\Platforms\Keywords\PostgreSQL94Keywords"/>
<referencedClass name="Doctrine\DBAL\Platforms\Keywords\SQLServer2012Keywords"/>
<referencedClass name="Doctrine\DBAL\Platforms\MySQL57Platform"/>
<referencedClass name="Doctrine\DBAL\Platforms\PostgreSQL100Platform"/>
<referencedClass name="Doctrine\DBAL\Platforms\PostgreSQL94Platform"/>
<referencedClass name="Doctrine\DBAL\Platforms\SQLServer2012Platform"/>
Expand Down
8 changes: 8 additions & 0 deletions src/Driver/AbstractMySQLDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrine\DBAL\Schema\MySQLSchemaManager;
use Doctrine\DBAL\VersionAwarePlatformDriver;
use Doctrine\Deprecations\Deprecation;

use function assert;
use function preg_match;
Expand Down Expand Up @@ -47,6 +48,13 @@ public function createDatabasePlatformForVersion($version)
}
}

Deprecation::trigger(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/5060',
'MySQL 5.6 support is deprecated and will be removed in DBAL 4.'
. ' Consider upgrading to MySQL 5.7 or later.'
);

return $this->getDatabasePlatform();
}

Expand Down
2 changes: 2 additions & 0 deletions src/Platforms/Keywords/MySQL57Keywords.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

/**
* MySQL 5.7 reserved keywords list.
*
* @deprecated Use {@link MySQLKeywords} instead.
*/
class MySQL57Keywords extends MySQLKeywords
{
Expand Down
3 changes: 3 additions & 0 deletions src/Platforms/MySQL57Platform.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

/**
* Provides the behavior, features and SQL dialect of the MySQL 5.7 (5.7.9 GA) database platform.
*
* @deprecated This class will be merged with {@see MySQLPlatform} in 4.0 because support for MySQL
* releases prior to 5.7 will be dropped.
*/
class MySQL57Platform extends MySQLPlatform
{
Expand Down