Skip to content

Commit

Permalink
Merge pull request #6436 from greg0ire/4.0.x
Browse files Browse the repository at this point in the history
Merge 3.8.x up into 4.0.x
  • Loading branch information
greg0ire authored Jun 12, 2024
2 parents 8cb38a3 + 1c4dcc6 commit 8edbce7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
Expand Down
13 changes: 7 additions & 6 deletions docs/en/reference/portability.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,16 @@ Using the following code block in your initialization will:
<?php
use Doctrine\DBAL\ColumnCase;
use Doctrine\DBAL\Configuration;
use Doctrine\DBAL\Portability\Connection as PortableConnection;
use Doctrine\DBAL\Portability\Middleware as PortableMiddleware;
$params = [
// vendor specific configuration
$configuration = new Configuration();
$configuration->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.
Expand Down
8 changes: 7 additions & 1 deletion src/Schema/MySQLSchemaManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 = ?'];
Expand Down

0 comments on commit 8edbce7

Please sign in to comment.