From d5c12dee85ef74f6060ae961e664486fc3c8fb3b Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Sun, 20 Mar 2022 11:01:05 -0700 Subject: [PATCH] Add MariaDB 10.7 to the build matrix --- .github/workflows/continuous-integration.yml | 7 +++++++ .../Functional/Schema/MySqlSchemaManagerTest.php | 16 +++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 3dc066adc0e..ef741e9f071 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -279,6 +279,7 @@ jobs: - "10.0" - "10.2" - "10.5" + - "10.7" extension: - "mysqli" - "pdo_mysql" @@ -289,6 +290,12 @@ jobs: - php-version: "8.1" mariadb-version: "10.5" extension: "pdo_mysql" + - php-version: "8.1" + mariadb-version: "10.7" + extension: "mysqli" + - php-version: "8.1" + mariadb-version: "10.7" + extension: "pdo_mysql" services: mariadb: diff --git a/tests/Doctrine/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php b/tests/Doctrine/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php index 936b9686524..d9356c97691 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php @@ -220,7 +220,6 @@ public function testColumnCharset(): void { $table = new Table('test_column_charset'); $table->addColumn('id', 'integer'); - $table->addColumn('no_charset', 'text'); $table->addColumn('foo', 'text')->setPlatformOption('charset', 'ascii'); $table->addColumn('bar', 'text')->setPlatformOption('charset', 'latin1'); $this->schemaManager->dropAndCreateTable($table); @@ -228,7 +227,6 @@ public function testColumnCharset(): void $columns = $this->schemaManager->listTableColumns('test_column_charset'); self::assertFalse($columns['id']->hasPlatformOption('charset')); - self::assertEquals('utf8', $columns['no_charset']->getPlatformOption('charset')); self::assertEquals('ascii', $columns['foo']->getPlatformOption('charset')); self::assertEquals('latin1', $columns['bar']->getPlatformOption('charset')); } @@ -280,12 +278,12 @@ public function testColumnCharsetChange(): void public function testColumnCollation(): void { $table = new Table('test_collation'); - $table->addOption('collate', $collation = 'latin1_swedish_ci'); + $table->addOption('collate', 'latin1_swedish_ci'); $table->addOption('charset', 'latin1'); $table->addColumn('id', 'integer'); $table->addColumn('text', 'text'); $table->addColumn('foo', 'text')->setPlatformOption('collation', 'latin1_swedish_ci'); - $table->addColumn('bar', 'text')->setPlatformOption('collation', 'utf8_general_ci'); + $table->addColumn('bar', 'text')->setPlatformOption('collation', 'utf8mb4_general_ci'); $table->addColumn('baz', 'text')->setPlatformOption('collation', 'binary'); $this->schemaManager->dropAndCreateTable($table); @@ -294,7 +292,7 @@ public function testColumnCollation(): void self::assertArrayNotHasKey('collation', $columns['id']->getPlatformOptions()); self::assertEquals('latin1_swedish_ci', $columns['text']->getPlatformOption('collation')); self::assertEquals('latin1_swedish_ci', $columns['foo']->getPlatformOption('collation')); - self::assertEquals('utf8_general_ci', $columns['bar']->getPlatformOption('collation')); + self::assertEquals('utf8mb4_general_ci', $columns['bar']->getPlatformOption('collation')); self::assertInstanceOf(BlobType::class, $columns['baz']->getType()); } @@ -525,9 +523,9 @@ public function testEnsureTableOptionsAreReflectedInMetadata(): void CREATE TABLE test_table_metadata( col1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY ) -COLLATE utf8_general_ci +COLLATE utf8mb4_general_ci ENGINE InnoDB -ROW_FORMAT COMPRESSED +ROW_FORMAT DYNAMIC COMMENT 'This is a test' AUTO_INCREMENT=42 PARTITION BY HASH (col1) @@ -537,11 +535,11 @@ public function testEnsureTableOptionsAreReflectedInMetadata(): void $onlineTable = $this->schemaManager->listTableDetails('test_table_metadata'); self::assertEquals('InnoDB', $onlineTable->getOption('engine')); - self::assertEquals('utf8_general_ci', $onlineTable->getOption('collation')); + self::assertEquals('utf8mb4_general_ci', $onlineTable->getOption('collation')); self::assertEquals(42, $onlineTable->getOption('autoincrement')); self::assertEquals('This is a test', $onlineTable->getOption('comment')); self::assertEquals([ - 'row_format' => 'COMPRESSED', + 'row_format' => 'DYNAMIC', 'partitioned' => true, ], $onlineTable->getOption('create_options')); }