diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index d8ec4964da2..bf419069870 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -84,7 +84,7 @@ jobs: if: "${{ matrix.extension == 'sqlite3' }}" - name: "Run PHPUnit" - run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml" + run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml --display-warnings" - name: "Upload coverage file" uses: "actions/upload-artifact@v4" @@ -141,7 +141,7 @@ jobs: composer-options: "--ignore-platform-req=php+" - name: "Run PHPUnit" - run: "vendor/bin/phpunit -c ci/github/phpunit/oci8${{ matrix.oracle-version < 23 && '-21' || '' }}.xml --coverage-clover=coverage.xml" + run: "vendor/bin/phpunit -c ci/github/phpunit/oci8${{ matrix.oracle-version < 23 && '-21' || '' }}.xml --coverage-clover=coverage.xml --display-warnings" - name: "Upload coverage file" uses: "actions/upload-artifact@v4" @@ -198,7 +198,7 @@ jobs: composer-options: "--ignore-platform-req=php+" - name: "Run PHPUnit" - run: "vendor/bin/phpunit -c ci/github/phpunit/pdo_oci${{ matrix.oracle-version < 23 && '-21' || '' }}.xml --coverage-clover=coverage.xml" + run: "vendor/bin/phpunit -c ci/github/phpunit/pdo_oci${{ matrix.oracle-version < 23 && '-21' || '' }}.xml --coverage-clover=coverage.xml --display-warnings" - name: "Upload coverage file" uses: "actions/upload-artifact@v4" @@ -262,7 +262,7 @@ jobs: composer-options: "--ignore-platform-req=php+" - name: "Run PHPUnit" - run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml" + run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml --display-warnings" - name: "Upload coverage file" uses: "actions/upload-artifact@v4" @@ -285,19 +285,19 @@ jobs: - "10.5" # LTS (Jun 2025) - "10.6" # LTS (Jul 2026) - "10.11" # LTS (Feb 2028) - - "11.0" # STS (Jun 2024) - "11.1" # STS (Aug 2024) - "11.2" # STS (Nov 2024) - "11.3" # STS (Feb 2025) + - "11.4" # LTS (May 2029) extension: - "mysqli" - "pdo_mysql" include: - php-version: "8.2" - mariadb-version: "11.2" + mariadb-version: "11.4" extension: "mysqli" - php-version: "8.3" - mariadb-version: "11.2" + mariadb-version: "11.4" extension: "pdo_mysql" services: @@ -308,7 +308,7 @@ jobs: MYSQL_DATABASE: "doctrine_tests" options: >- - --health-cmd "mariadb-admin ping --silent || mysqladmin ping --silent" + --health-cmd "healthcheck.sh --connect --innodb_initialized || mysqladmin ping --protocol tcp --silent" ports: - "3306:3306" @@ -333,7 +333,7 @@ jobs: composer-options: "--ignore-platform-req=php+" - name: "Run PHPUnit" - run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml" + run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml --display-warnings" - name: "Upload coverage file" uses: "actions/upload-artifact@v4" @@ -417,7 +417,7 @@ jobs: if: "${{ endsWith(matrix.config-file-suffix, 'tls') }}" - name: "Run PHPUnit" - run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}${{ matrix.config-file-suffix }}.xml --coverage-clover=coverage.xml" + run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}${{ matrix.config-file-suffix }}.xml --coverage-clover=coverage.xml --display-warnings" - name: "Upload coverage file" uses: "actions/upload-artifact@v4" @@ -484,7 +484,7 @@ jobs: composer-options: "--ignore-platform-req=php+" - name: "Run PHPUnit" - run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml" + run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml --display-warnings" - name: "Upload coverage file" uses: "actions/upload-artifact@v4" @@ -555,7 +555,7 @@ jobs: composer-options: "--ignore-platform-req=php+" - name: "Run PHPUnit" - run: "vendor/bin/phpunit -c ci/github/phpunit/ibm_db2.xml --coverage-clover=coverage.xml" + run: "vendor/bin/phpunit -c ci/github/phpunit/ibm_db2.xml --coverage-clover=coverage.xml --display-warnings" - name: "Upload coverage file" uses: "actions/upload-artifact@v4" @@ -590,7 +590,7 @@ jobs: composer-options: "--prefer-dist" - name: "Run PHPUnit" - run: "vendor/bin/phpunit -c ci/github/phpunit/pdo_sqlite.xml" + run: "vendor/bin/phpunit -c ci/github/phpunit/pdo_sqlite.xml --display-warnings" upload_coverage: name: "Upload coverage to Codecov" diff --git a/docs/en/reference/portability.rst b/docs/en/reference/portability.rst index 65dc5148db0..b98bad718fa 100644 --- a/docs/en/reference/portability.rst +++ b/docs/en/reference/portability.rst @@ -51,15 +51,16 @@ Using the following code block in your initialization will: setMiddlewares([ + // Other middlewares //... - 'wrapperClass' => PortableConnection::class, - 'portability' => PortableConnection::PORTABILITY_ALL, - 'fetch_case' => ColumnCase::LOWER, - ]; + new PortableMiddleware(PortableConnection::PORTABILITY_ALL, ColumnCase::LOWER), + ]); This sort of portability handling is pretty expensive because all the result rows and columns have to be looped inside PHP before being returned to you. diff --git a/src/Schema/MySQLSchemaManager.php b/src/Schema/MySQLSchemaManager.php index fa042d653ce..249be132e36 100644 --- a/src/Schema/MySQLSchemaManager.php +++ b/src/Schema/MySQLSchemaManager.php @@ -460,6 +460,11 @@ protected function selectForeignKeyColumns(string $databaseName, ?string $tableN */ protected function fetchTableOptionsByTable(string $databaseName, ?string $tableName = null): array { + // MariaDB-10.10.1 added FULL_COLLATION_NAME to the information_schema.COLLATION_CHARACTER_SET_APPLICABILITY. + // A base collation like uca1400_ai_ci can refer to multiple character sets. The value in the + // information_schema.TABLES.TABLE_COLLATION corresponds to the full collation name. + // The MariaDB executable comment syntax with version, /*M!101001, is exclusively executed on + // MariaDB-10.10.1+ servers for backwards compatibility, and compatiblity to MySQL servers. $sql = <<<'SQL' SELECT t.TABLE_NAME, t.ENGINE, @@ -470,7 +475,8 @@ protected function fetchTableOptionsByTable(string $databaseName, ?string $table ccsa.CHARACTER_SET_NAME FROM information_schema.TABLES t INNER JOIN information_schema.COLLATION_CHARACTER_SET_APPLICABILITY ccsa - ON ccsa.COLLATION_NAME = t.TABLE_COLLATION + ON /*M!101001 ccsa.FULL_COLLATION_NAME = t.TABLE_COLLATION OR */ + ccsa.COLLATION_NAME = t.TABLE_COLLATION SQL; $conditions = ['t.TABLE_SCHEMA = ?'];