diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 7f7917818b..05f4e39cad 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -182,6 +182,10 @@ jobs: php-version: "8.2" mysql-version: "9.1" extension: "mysqli" + - config-file-suffix: "-stringify_fetches" + php-version: "8.2" + mysql-version: "9.1" + extension: "pdo_mysql" - php-version: "8.2" mysql-version: "9.1" extension: "mysqli" diff --git a/ci/github/phpunit/pdo_mysql-stringify_fetches.xml b/ci/github/phpunit/pdo_mysql-stringify_fetches.xml new file mode 100644 index 0000000000..eeb23e963f --- /dev/null +++ b/ci/github/phpunit/pdo_mysql-stringify_fetches.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + ../../../tests + + + + + + ../../../src + + + diff --git a/tests/Functional/Schema/MySQLSchemaManagerTest.php b/tests/Functional/Schema/MySQLSchemaManagerTest.php index a17d6a4d42..eb5dad7fc8 100644 --- a/tests/Functional/Schema/MySQLSchemaManagerTest.php +++ b/tests/Functional/Schema/MySQLSchemaManagerTest.php @@ -21,6 +21,7 @@ use Doctrine\DBAL\Tests\Functional\Schema\MySQL\CustomType; use Doctrine\DBAL\Tests\Functional\Schema\MySQL\PointType; use Doctrine\DBAL\Tests\TestUtil; +use Doctrine\DBAL\Types\BinaryType; use Doctrine\DBAL\Types\BlobType; use Doctrine\DBAL\Types\FloatType; use Doctrine\DBAL\Types\JsonType; @@ -546,6 +547,27 @@ public function testListUnsignedFloatTypeColumns(): void self::assertTrue($columns['col_smallfloat_unsigned']->getUnsigned()); } + public function testConfigurableLengthColumns(): void + { + $table = Table::editor() + ->setUnquotedName('test_configurable_length_columns') + ->setColumns( + Column::editor() + ->setUnquotedName('col_binary') + ->setTypeName(Types::BINARY) + ->setLength(16) + ->create(), + ) + ->create(); + + $this->dropAndCreateTable($table); + + $columns = $this->schemaManager->listTableColumns('test_configurable_length_columns'); + + self::assertInstanceOf(BinaryType::class, $columns['col_binary']->getType()); + self::assertSame(16, $columns['col_binary']->getLength()); + } + public function testJsonColumnType(): void { $table = Table::editor()