|
14 | 14 | use Doctrine\DBAL\Platforms\MariaDb1060Platform;
|
15 | 15 | use Doctrine\DBAL\Platforms\MySQL57Platform;
|
16 | 16 | use Doctrine\DBAL\Platforms\MySQL80Platform;
|
| 17 | +use Doctrine\DBAL\Platforms\MySQL84Platform; |
17 | 18 | use Doctrine\DBAL\Platforms\MySQLPlatform;
|
18 | 19 | use Doctrine\DBAL\Schema\MySQLSchemaManager;
|
19 | 20 | use Doctrine\DBAL\VersionAwarePlatformDriver;
|
@@ -64,6 +65,20 @@ public function createDatabasePlatformForVersion($version)
|
64 | 65 | }
|
65 | 66 | } else {
|
66 | 67 | $oracleMysqlVersion = $this->getOracleMysqlVersionNumber($version);
|
| 68 | + |
| 69 | + if (version_compare($oracleMysqlVersion, '8.4.', '>=')) { |
| 70 | + if (! version_compare($version, '8.4.0', '>=')) { |
| 71 | + Deprecation::trigger( |
| 72 | + 'doctrine/orm', |
| 73 | + 'https://github.com/doctrine/dbal/pull/5779', |
| 74 | + 'Version detection logic for MySQL will change in DBAL 4. ' |
| 75 | + . 'Please specify the version as the server reports it, e.g. "8.4.0" instead of "8.4".', |
| 76 | + ); |
| 77 | + } |
| 78 | + |
| 79 | + return new MySQL84Platform(); |
| 80 | + } |
| 81 | + |
67 | 82 | if (version_compare($oracleMysqlVersion, '8', '>=')) {
|
68 | 83 | if (! version_compare($version, '8.0.0', '>=')) {
|
69 | 84 | Deprecation::trigger(
|
@@ -130,6 +145,8 @@ private function getOracleMysqlVersionNumber(string $versionString): string
|
130 | 145 |
|
131 | 146 | if ($majorVersion === '5' && $minorVersion === '7') {
|
132 | 147 | $patchVersion ??= '9';
|
| 148 | + } else { |
| 149 | + $patchVersion ??= '0'; |
133 | 150 | }
|
134 | 151 |
|
135 | 152 | return $majorVersion . '.' . $minorVersion . '.' . $patchVersion;
|
|
0 commit comments