Skip to content

Commit 782bea5

Browse files
committed
AC-8402: Ensure compatibility with the latest MariaDB patch versions
1 parent 065736e commit 782bea5

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

dev/tests/setup-integration/_files/Magento/TestSetupDeclarationModule1/fixture/declarative_installer/constraint_modification.mariadb10427.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
// @codingStandardsIgnoreFile
79
return [
810
'auto_increment_test' => 'CREATE TABLE `auto_increment_test` (

dev/tests/setup-integration/_files/Magento/TestSetupDeclarationModule1/fixture/declarative_installer/table_removal.mariadb10427.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
return [
79
'auto_increment_test' => 'CREATE TABLE `auto_increment_test` (
810
`int_auto_increment_with_nullable` int(10) unsigned NOT NULL AUTO_INCREMENT,

dev/tests/setup-integration/_files/Magento/TestSetupDeclarationModule2/fixture/shards.mariadb10427.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
return [
79
'test_table_one' => 'CREATE TABLE `test_table_one` (
810
`smallint` smallint(6) NOT NULL AUTO_INCREMENT,

lib/internal/Magento/Framework/DB/Adapter/SqlVersionProvider.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ public function isMysqlGte8029(): bool
153153
public function isMariaDBGte10611(): bool
154154
{
155155
$sqlVersion = $this->getSqlVersion();
156-
$isMariaDB = str_contains($sqlVersion, SqlVersionProvider::MARIA_DB_10_VERSION);
156+
$isMariaDB106 = str_contains($sqlVersion, SqlVersionProvider::MARIA_DB_10_6_VERSION);
157157
$sqlExactVersion = $this->fetchSqlVersion(ResourceConnection::DEFAULT_CONNECTION);
158-
if ($isMariaDB && version_compare($sqlExactVersion, '10.6.11', '>=')) {
158+
if ($isMariaDB106 && version_compare($sqlExactVersion, '10.6.11', '>=')) {
159159
return true;
160160
}
161161
return false;
@@ -170,9 +170,9 @@ public function isMariaDBGte10611(): bool
170170
public function isMariaDBGte10427(): bool
171171
{
172172
$sqlVersion = $this->getSqlVersion();
173-
$isMariaDB = str_contains($sqlVersion, SqlVersionProvider::MARIA_DB_10_VERSION);
173+
$isMariaDB104 = str_contains($sqlVersion, SqlVersionProvider::MARIA_DB_10_4_VERSION);
174174
$sqlExactVersion = $this->fetchSqlVersion(ResourceConnection::DEFAULT_CONNECTION);
175-
if ($isMariaDB && version_compare($sqlExactVersion, '10.4.27', '>=')) {
175+
if ($isMariaDB104 && version_compare($sqlExactVersion, '10.4.27', '>=')) {
176176
return true;
177177
}
178178
return false;

0 commit comments

Comments
 (0)