From 7f9b78d6e5b60e190276e51b9335120078c64e1b Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Fri, 7 Jun 2024 18:35:40 +0200 Subject: [PATCH 1/5] Fix typo in the portability documentation (#6430) --- docs/en/reference/portability.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/reference/portability.rst b/docs/en/reference/portability.rst index 3eaf8ae2267..b98bad718fa 100644 --- a/docs/en/reference/portability.rst +++ b/docs/en/reference/portability.rst @@ -53,7 +53,7 @@ Using the following code block in your initialization will: use Doctrine\DBAL\ColumnCase; use Doctrine\DBAL\Configuration; use Doctrine\DBAL\Portability\Connection as PortableConnection; - use Doctrine\DBAL\Portability\Middleware as PotableMiddleware; + use Doctrine\DBAL\Portability\Middleware as PortableMiddleware; $configuration = new Configuration(); $configuration->setMiddlewares([ From ac1b4fb6248f001ff261a4f08841122b6b6dc0d1 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Sat, 8 Jun 2024 19:45:05 +0200 Subject: [PATCH 2/5] CI MariaDB: add 11.4, remove 11.0 (#6432) Cherry-picked from #6426. Co-authored-by: Daniel Black --- .github/workflows/continuous-integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 57ca34a223e..d7a9741b865 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -302,10 +302,10 @@ 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" From 0e3536ba088a749985c8801105b6b3ac6c1280b6 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Sun, 9 Jun 2024 03:49:56 +1000 Subject: [PATCH 3/5] CI: Update MariaDB versions (#6426) | Q | A |------------- | ----------- | Type | improvement | Fixed issues | N/A #### Summary Improve the CI to cover newer versions of MariaDB 11.4+. Also cover the quay.io/mariadb-foundation/mariadb-devel images from https://quay.io/repository/mariadb-foundation/mariadb-devel?tab=tags where they are updated with completed, reviewed and tested changes in the MariaDB server main branch. These are completed features/bug fixes in the next server version. As such this is a good thing to test before the users get the final product. ref: https://mariadb.org/new-service-quay-io-mariadb-foundation-mariadb-devel/ The test failures here are fixed by #6425. --- .github/workflows/continuous-integration.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index d7a9741b865..fcb77758984 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -317,16 +317,16 @@ jobs: mariadb-version: "10.6" extension: "pdo_mysql" - php-version: "8.2" - mariadb-version: "11.2" + mariadb-version: "11.4" extension: "mysqli" - php-version: "8.2" - mariadb-version: "11.2" + mariadb-version: "11.4" extension: "pdo_mysql" - php-version: "8.3" - 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: @@ -337,7 +337,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" From aa9673746ff6680892fe9bff6b1f0c8a1b44bf17 Mon Sep 17 00:00:00 2001 From: David Maicher Date: Mon, 17 Jun 2024 22:02:35 +0200 Subject: [PATCH 4/5] Revert "Merge pull request #6413 from achterin/bugfix/foreign_key_name_change_detection" This reverts commit 080aab5a9588f137ef3e1ad7e0d056a4517b4e16, reversing changes made to a5d2bafb2b009cca29837db45ac6febe6c963859. --- src/Schema/Comparator.php | 4 ---- tests/Schema/AbstractComparatorTestCase.php | 9 ++++----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/Schema/Comparator.php b/src/Schema/Comparator.php index 804c981702b..28e7f2f73b2 100644 --- a/src/Schema/Comparator.php +++ b/src/Schema/Comparator.php @@ -555,10 +555,6 @@ private function detectRenamedIndexes(array &$addedIndexes, array &$removedIndex */ public function diffForeignKey(ForeignKeyConstraint $key1, ForeignKeyConstraint $key2) { - if (strtolower($key1->getName()) !== strtolower($key2->getName())) { - return true; - } - if ( array_map('strtolower', $key1->getUnquotedLocalColumns()) !== array_map('strtolower', $key2->getUnquotedLocalColumns()) diff --git a/tests/Schema/AbstractComparatorTestCase.php b/tests/Schema/AbstractComparatorTestCase.php index 0470c0cdfea..a087202628f 100644 --- a/tests/Schema/AbstractComparatorTestCase.php +++ b/tests/Schema/AbstractComparatorTestCase.php @@ -652,7 +652,7 @@ public function testCompareColumnCompareCaseInsensitive(): void self::assertFalse($tableDiff); } - public function testDetectIndexNameChange(): void + public function testCompareIndexBasedOnPropertiesNotName(): void { $tableA = new Table('foo'); $tableA->addColumn('id', Types::INTEGER); @@ -672,7 +672,7 @@ public function testDetectIndexNameChange(): void ); } - public function testDetectForeignKeyNameChange(): void + public function testCompareForeignKeyBasedOnPropertiesNotName(): void { $tableA = new Table('foo'); $tableA->addColumn('id', Types::INTEGER); @@ -683,9 +683,8 @@ public function testDetectForeignKeyNameChange(): void $tableB->addForeignKeyConstraint('bar', ['id'], ['id'], [], 'bar_constraint'); $tableDiff = $this->comparator->diffTable($tableA, $tableB); - self::assertNotFalse($tableDiff); - self::assertCount(1, $tableDiff->addedForeignKeys); - self::assertCount(1, $tableDiff->removedForeignKeys); + + self::assertFalse($tableDiff); } public function testCompareForeignKeyRestrictNoActionAreTheSame(): void From 032d9024df4eb37c0c88ff9bc31e8216da9f1e18 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Tue, 18 Jun 2024 14:06:51 +0200 Subject: [PATCH 5/5] PHPStan 1.11.5 (#6446) --- composer.json | 2 +- phpstan.neon.dist | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ab12807dace..3553f56f8e0 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,7 @@ "doctrine/coding-standard": "12.0.0", "fig/log-test": "^1", "jetbrains/phpstorm-stubs": "2023.1", - "phpstan/phpstan": "1.11.1", + "phpstan/phpstan": "1.11.5", "phpstan/phpstan-strict-rules": "^1.6", "phpunit/phpunit": "9.6.19", "psalm/plugin-phpunit": "0.18.4", diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 9c3b2389430..e7a2aad5461 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -146,5 +146,11 @@ parameters: # Ignore the possible false return value of db2_num_rows(). - '~^Method Doctrine\\DBAL\\Driver\\IBMDB2\\Connection\:\:exec\(\) should return int but returns int<0, max>\|false\.$~' - '~^Method Doctrine\\DBAL\\Driver\\IBMDB2\\Result\:\:rowCount\(\) should return int but returns int<0, max>\|false\.$~' + + # This is a rather complicated closure setup. We understand this, so PHPStan doesn't have to. + - + message: '#^Parameter \#2 \$callback of function array_reduce expects callable\(\(callable&TIn\)\|Closure\(mixed \$value\)\: mixed\|null, callable\(T\)\: T\)\: \(\(callable&TIn\)\|Closure\(mixed \$value\)\: mixed\|null\), Closure\(callable\|null, callable\)\: \(callable\(T\)\: T\) given\.$#' + path: src/Portability/Converter.php + includes: - vendor/phpstan/phpstan-strict-rules/rules.neon