Skip to content

Commit 9a20ccf

Browse files
authored
Remove support for MariaDB 10.5 (#7008)
| Q | A |------------- | ----------- | Type | improvement | Fixed issues | Follows #7000 #### Summary MariaDB 10.5 will be EOL before we release DBAL 5.
1 parent 413d5e2 commit 9a20ccf

File tree

8 files changed

+7
-50
lines changed

8 files changed

+7
-50
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@ jobs:
138138
- "8.4"
139139
mariadb-version:
140140
# keep in sync with https://mariadb.org/about/#maintenance-policy
141-
- "10.5" # Oldest version supported by DBAL, LTS (Jun 2025) We have code specific to 10.5.2-10.6.0
142-
- "10.6" # LTS (Jul 2026) We have code specific to 10.6.0-10.10.0
141+
- "10.6" # Oldest version supported by DBAL, LTS (Jul 2026) We have code specific to 10.6.0-10.10.0
143142
- "10.11" # LTS (Feb 2028) We have code specific to ^10.10
144143
- "11.4" # LTS (May 2029)
145144
- "11.8" # LTS (Jun 2028)

UPGRADE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,9 @@ The `CREATE_INDEXES` and `CREATE_FOREIGNKEYS` constants have been removed from t
340340
A new method `getColumnName()` has been added to the `Result` interface and must be implemented by
341341
all drivers and middleware.
342342

343-
## BC BREAK: Removed support for MariaDB 10.4, MySQL 5.7 and Postgres 10 + 11
343+
## BC BREAK: Removed support for MariaDB 10.4 + 10.5, MySQL 5.7 and Postgres 10 + 11
344344

345-
* Upgrade to MariaDB 10.5 or later.
345+
* Upgrade to MariaDB 10.6 or later.
346346
* Upgrade to MySQL 8.0 or later.
347347
* Upgrade to Postgres 12 or later.
348348

src/Driver/AbstractMySQLDriver.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@
1010
use Doctrine\DBAL\Platforms\AbstractMySQLPlatform;
1111
use Doctrine\DBAL\Platforms\Exception\InvalidPlatformVersion;
1212
use Doctrine\DBAL\Platforms\MariaDB1010Platform;
13-
use Doctrine\DBAL\Platforms\MariaDB1060Platform;
1413
use Doctrine\DBAL\Platforms\MariaDBPlatform;
1514
use Doctrine\DBAL\Platforms\MySQLPlatform;
1615
use Doctrine\DBAL\ServerVersionProvider;
17-
use Doctrine\Deprecations\Deprecation;
1816

1917
use function preg_match;
2018
use function stripos;
@@ -39,16 +37,6 @@ public function getDatabasePlatform(ServerVersionProvider $versionProvider): Abs
3937
return new MariaDB1010Platform();
4038
}
4139

42-
if (version_compare($mariaDbVersion, '10.6.0', '>=')) {
43-
return new MariaDB1060Platform();
44-
}
45-
46-
Deprecation::trigger(
47-
'doctrine/dbal',
48-
'https://github.com/doctrine/dbal/pull/6343',
49-
'Support for MariaDB < 10.6.0 is deprecated and will be removed in DBAL 5',
50-
);
51-
5240
return new MariaDBPlatform();
5341
}
5442

src/Platforms/MariaDB1010Platform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/**
1212
* Provides the behavior, features and SQL dialect of the MariaDB 10.10 database platform.
1313
*/
14-
class MariaDB1010Platform extends MariaDB1060Platform
14+
class MariaDB1010Platform extends MariaDBPlatform
1515
{
1616
public function createSelectSQLBuilder(): SelectSQLBuilder
1717
{

src/Platforms/MariaDB1060Platform.php

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/Platforms/MariaDBPlatform.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
use Doctrine\DBAL\Schema\ForeignKeyConstraint;
88
use Doctrine\DBAL\Schema\Index;
9-
use Doctrine\DBAL\SQL\Builder\DefaultSelectSQLBuilder;
10-
use Doctrine\DBAL\SQL\Builder\SelectSQLBuilder;
119
use Doctrine\DBAL\Types\JsonType;
1210

1311
use function sprintf;
@@ -94,9 +92,4 @@ protected function getColumnDeclarationSQL(array $column): string
9492

9593
return parent::getColumnDeclarationSQL($column);
9694
}
97-
98-
public function createSelectSQLBuilder(): SelectSQLBuilder
99-
{
100-
return new DefaultSelectSQLBuilder($this, 'FOR UPDATE', null);
101-
}
10295
}

tests/Driver/VersionAwarePlatformDriverTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Doctrine\DBAL\Driver;
99
use Doctrine\DBAL\Platforms\AbstractPlatform;
1010
use Doctrine\DBAL\Platforms\MariaDB1010Platform;
11-
use Doctrine\DBAL\Platforms\MariaDB1060Platform;
1211
use Doctrine\DBAL\Platforms\MariaDBPlatform;
1312
use Doctrine\DBAL\Platforms\MySQLPlatform;
1413
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
@@ -37,9 +36,8 @@ public static function mySQLVersionProvider(): array
3736
['5.5.40-MariaDB-1~wheezy', MariaDBPlatform::class],
3837
['5.5.5-MariaDB-10.2.8+maria~xenial-log', MariaDBPlatform::class],
3938
['10.2.8-MariaDB-10.2.8+maria~xenial-log', MariaDBPlatform::class],
40-
['10.5.2-MariaDB-1~lenny-log', MariaDBPlatform::class],
41-
['10.6.0-MariaDB-1~lenny-log', MariaDB1060Platform::class],
42-
['10.9.3-MariaDB-1~lenny-log', MariaDB1060Platform::class],
39+
['10.6.0-MariaDB-1~lenny-log', MariaDBPlatform::class],
40+
['10.9.3-MariaDB-1~lenny-log', MariaDBPlatform::class],
4341
['11.0.2-MariaDB-1:11.0.2+maria~ubu2204', MariaDB1010Platform::class],
4442
];
4543
}

tests/Functional/Query/QueryBuilderTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
use Doctrine\DBAL\Exception;
1010
use Doctrine\DBAL\ParameterType;
1111
use Doctrine\DBAL\Platforms\DB2Platform;
12-
use Doctrine\DBAL\Platforms\MariaDB1060Platform;
1312
use Doctrine\DBAL\Platforms\MariaDBPlatform;
1413
use Doctrine\DBAL\Platforms\MySQLPlatform;
1514
use Doctrine\DBAL\Platforms\OraclePlatform;
@@ -549,7 +548,7 @@ private function platformSupportsSkipLocked(): bool
549548
}
550549

551550
if ($platform instanceof MariaDBPlatform) {
552-
return $platform instanceof MariaDB1060Platform;
551+
return true;
553552
}
554553

555554
return ! $platform instanceof SQLitePlatform;

0 commit comments

Comments
 (0)