- Issue created by @andypost
- Merge request !9732Upgrade composer to 2.8.1 for PHP 8.4 - 11.x #3478331 β (Closed) created by andypost
- Merge request !9733Upgrade composer to 2.8.1 for PHP 8.4 - 10.4.x #3478331 β (Closed) created by andypost
- π«π·France andypost
11.x changes
+----------------------------------+---------+---------+ | Production Changes | From | To | +----------------------------------+---------+---------+ | composer/semver | 3.4.2 | 3.4.3 | | psr/log | 3.0.0 | 3.0.2 | | symfony/console | v7.1.3 | v7.1.5 | | symfony/filesystem | v7.1.2 | v7.1.5 | | symfony/finder | v7.1.3 | v7.1.4 | | symfony/polyfill-ctype | v1.30.0 | v1.31.0 | | symfony/polyfill-intl-grapheme | v1.30.0 | v1.31.0 | | symfony/polyfill-intl-normalizer | v1.30.0 | v1.31.0 | | symfony/polyfill-mbstring | v1.30.0 | v1.31.0 | | symfony/process | v7.1.3 | v7.1.5 | | symfony/string | v7.1.3 | v7.1.5 | +----------------------------------+---------+---------+ +--------------------+-------+-------+ | Dev Changes | From | To | +--------------------+-------+-------+ | composer/ca-bundle | 1.5.1 | 1.5.2 | | composer/composer | 2.7.7 | 2.8.0 | | composer/pcre | 3.2.0 | 3.3.1 | +--------------------+-------+-------+
10.4.x changes require to upgrade phpStan
+----------------------------------+---------+---------+ | Production Changes | From | To | +----------------------------------+---------+---------+ | composer/semver | 3.4.0 | 3.4.3 | | psr/log | 3.0.0 | 3.0.2 | | symfony/console | v6.4.8 | v6.4.12 | | symfony/filesystem | v6.4.8 | v6.4.12 | | symfony/finder | v6.4.8 | v6.4.11 | | symfony/polyfill-ctype | v1.29.0 | v1.31.0 | | symfony/polyfill-intl-grapheme | v1.29.0 | v1.31.0 | | symfony/polyfill-intl-normalizer | v1.29.0 | v1.31.0 | | symfony/polyfill-mbstring | v1.29.0 | v1.31.0 | | symfony/process | v6.4.8 | v6.4.12 | | symfony/string | v6.4.8 | v6.4.12 | +----------------------------------+---------+---------+ +---------------------------+---------+--------+ | Dev Changes | From | To | +---------------------------+---------+--------+ | composer/ca-bundle | 1.5.0 | 1.5.2 | | justinrainbow/json-schema | v5.2.13 | 5.3.0 | | seld/jsonlint | 1.10.2 | 1.11.0 | +---------------------------+---------+--------+
- π«π·France andypost
Final 10.4.x changes
| Production Changes | From | To | +----------------------------------+---------+---------+ | composer/semver | 3.4.0 | 3.4.3 | | psr/log | 3.0.0 | 3.0.2 | | symfony/console | v6.4.8 | v6.4.12 | | symfony/filesystem | v6.4.8 | v6.4.12 | | symfony/finder | v6.4.8 | v6.4.11 | | symfony/polyfill-ctype | v1.29.0 | v1.31.0 | | symfony/polyfill-intl-grapheme | v1.29.0 | v1.31.0 | | symfony/polyfill-intl-normalizer | v1.29.0 | v1.31.0 | | symfony/polyfill-mbstring | v1.29.0 | v1.31.0 | | symfony/process | v6.4.8 | v6.4.12 | | symfony/string | v6.4.8 | v6.4.12 | +----------------------------------+---------+---------+ +---------------------------+---------+--------+ | Dev Changes | From | To | +---------------------------+---------+--------+ | composer/ca-bundle | 1.5.0 | 1.5.2 | | composer/composer | 2.7.7 | 2.8.0 | | composer/pcre | 3.1.4 | 3.3.1 | | justinrainbow/json-schema | v5.2.13 | 5.3.0 | | nikic/php-parser | v5.2.0 | v5.3.0 | | phpstan/phpdoc-parser | 1.29.0 | 1.32.0 | | phpstan/phpstan | 1.11.0 | 1.12.5 | | seld/jsonlint | 1.10.2 | 1.11.0 | +---------------------------+---------+--------+
- π¬π§United Kingdom longwave UK
Looks good but NW to fix the PHPStan issues in 10.4.
- π«π·France andypost
Using
composer update composer/composer phpstan/phpstan --with=phpstan/phpstan:1.11.10 -W
solved the trickBut there's still failures, so I filed separate issue for 10.4 upgrade of phpstan to inline its version with 11.x π upgrade phpstan to 1.11.10 for 10.4.x Active
+----------------------------------+---------+---------+ | Production Changes | From | To | +----------------------------------+---------+---------+ | composer/semver | 3.4.0 | 3.4.3 | | psr/log | 3.0.0 | 3.0.2 | | symfony/console | v6.4.8 | v6.4.12 | | symfony/filesystem | v6.4.8 | v6.4.12 | | symfony/finder | v6.4.8 | v6.4.11 | | symfony/polyfill-ctype | v1.29.0 | v1.31.0 | | symfony/polyfill-intl-grapheme | v1.29.0 | v1.31.0 | | symfony/polyfill-intl-normalizer | v1.29.0 | v1.31.0 | | symfony/polyfill-mbstring | v1.29.0 | v1.31.0 | | symfony/process | v6.4.8 | v6.4.12 | | symfony/string | v6.4.8 | v6.4.12 | +----------------------------------+---------+---------+ +---------------------------+---------+---------+ | Dev Changes | From | To | +---------------------------+---------+---------+ | composer/ca-bundle | 1.5.0 | 1.5.2 | | composer/composer | 2.7.7 | 2.8.0 | | composer/pcre | 3.1.4 | 3.3.1 | | justinrainbow/json-schema | v5.2.13 | 5.3.0 | | phpstan/phpstan | 1.11.0 | 1.11.10 | | seld/jsonlint | 1.10.2 | 1.11.0 | +---------------------------+---------+---------+
- πΊπΈUnited States smustgrave
The 10.4 MR appears to be failing consistently
- π«π·France andypost
Yes, 10.4 require bump for phpstan and few fixes backported from earlier 11.x upgrades
- π«π·France andypost
Today there's bug-fix release so I set it
composer.json
+------------------------------+-------+-------+ | Dev Changes | From | To | +------------------------------+-------+-------+ | composer/class-map-generator | 1.3.4 | 1.4.0 | | composer/composer | 2.8.0 | 2.8.1 | +------------------------------+-------+-------+
- πΊπΈUnited States smustgrave
Been trying to keep up so you donβt have to do a million rebases but seems latest still isnβt passing 10.4
- πΊπΈUnited States smustgrave
Now this appears to be good to go. Thanks!
- π«π·France andypost
restarted for
---- Drupal\Tests\page_cache\Functional\PageCacheTest ---- Status Group Filename Line Function -------------------------------------------------------------------------------- Exception Other phpunit-5.xml 0 Drupal\Tests\page_cache\Functional\ PHPUnit Test failed to complete; Error: PHPUnit 9.6.21 by Sebastian Bergmann and contributors. Testing Drupal\Tests\page_cache\Functional\PageCacheTest ...E. 5 / 5 (100%) Time: 01:17.599, Memory: 8.00 MB There was 1 error: 1) Drupal\Tests\page_cache\Functional\PageCacheTest::testFormImmutability Behat\Mink\Exception\ResponseTextException: The text "Immutable: FALSE" was not found anywhere in the text of the current page. /builds/issue/drupal-3478331/vendor/behat/mink/src/WebAssert.php:907 /builds/issue/drupal-3478331/vendor/behat/mink/src/WebAssert.php:293 /builds/issue/drupal-3478331/core/tests/Drupal/Tests/WebAssert.php:979 /builds/issue/drupal-3478331/core/modules/page_cache/tests/src/Functional/PageCacheTest.php:485 /builds/issue/drupal-3478331/vendor/phpunit/phpunit/src/Framework/TestResult.php:729 ERRORS! Tests: 5, Assertions: 189, Errors : 1.
-
longwave β
committed 5c8b515c on 11.x
Issue #3478331 by andypost, smustgrave: Upgrade composer to 2.8.1 for...
-
longwave β
committed 5c8b515c on 11.x
-
longwave β
committed 00ebb2fc on 10.4.x
Issue #3478331 by andypost, smustgrave: Upgrade composer to 2.8.1 for...
-
longwave β
committed 00ebb2fc on 10.4.x
- π¬π§United Kingdom longwave UK
- π¬π§United Kingdom mcdruid π¬π§πͺπΊ
I think this may have broken some tests?
See e.g. https://git.drupalcode.org/issue/drupal-3479411/-/jobs/2990908
Drupal\BuildTests\Composer\Template\ComposerProjectTemplates 0 passes 17s 1 fails <=== Drupal\BuildTests\Composer\Component\ComponentsTaggedRelease 4 passes 41s Drupal\BuildTests\Command\GenerateThemeTest 16 passes 88s Drupal\BuildTests\Composer\Component\ComponentsIsolatedBuild 24 passes 134s Test run duration: 2 min 13 sec Detailed test results --------------------- ---- Drupal\BuildTests\Composer\Template\ComposerProjectTemplatesTest ---- Status Group Filename Line Function -------------------------------------------------------------------------------- Fail Other phpunit-1.xml 0 Drupal\BuildTests\Composer\Template PHPUnit Test failed to complete; Error: PHPUnit 10.5.35 by Sebastian Bergmann and contributors. Runtime: PHP 8.3.12 Configuration: /builds/issue/drupal-3479411/core/phpunit.xml.dist ..FF 4 / 4 (100%) Time: 00:16.442, Memory: 14.00 MB There were 2 failures: 1) Drupal\BuildTests\Composer\Template\ComposerProjectTemplatesTest::testTemplateCreateProject with data set "recommended-project" ('drupal/recommended-project', 'composer/Template/RecommendedProject', '/web') COMMAND: COMPOSER_HOME=/tmp/build_workspace_142b3cf5f42e57cba5237822b73defbcu4lXMx/composer-home COMPOSER_ROOT_VERSION=11.0 composer create-project --no-ansi drupal/recommended-project test_project 11.0 -vvv --repository /tmp/build_workspace_142b3cf5f42e57cba5237822b73defbcu4lXMx/test_repository/packages.json OUTPUT: ERROR: Running 2.8.1 (2024-10-04 11:31:01) with PHP 8.3.12 on Linux / 5.10.225-213.878.amzn2.x86_64 Reading ./composer.json (/tmp/build_workspace_142b3cf5f42e57cba5237822b73defbcu4lXMx/composer.json) Loading config file /tmp/build_workspace_142b3cf5f42e57cba5237822b73defbcu4lXMx/composer-home/config.json Loading config file /tmp/build_workspace_142b3cf5f42e57cba5237822b73defbcu4lXMx/composer-home/auth.json Loading config file ./composer.json (/tmp/build_workspace_142b3cf5f42e57cba5237822b73defbcu4lXMx/composer.json) ...snip... /tmp/build_workspace_142b3cf5f42e57cba5237822b73defbcu4lXMx/composer-home/cache/repo/file----tmp-build-workspace-142b3cf5f42e57cba5237822b73defbcu4lXMx-test-repository-packages.json/packages.json into cache Installing drupal/recommended-project (11.0) In PathDownloader.php line 51: [RuntimeException] Source path "composer/Template/RecommendedProject" is not found for package drupal/recommended-project
I can reproduce this by e.g. replacing ddev's current composer (2.7.9) with the phar for 2.8.1 then trying to run just that one test manually:
mcdruid@drupal-10:/var/www/html$ vendor/phpunit/phpunit/phpunit -c core core/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php PHPUnit 10.5.29 by Sebastian Bergmann and contributors. Runtime: PHP 8.3.10 Configuration: /var/www/html/core/phpunit.xml.mysql ..FF 4 / 4 (100%) Time: 00:08.780, Memory: 14.00 MB There was 1 PHPUnit test runner deprecation: 1) Your XML configuration validates against a deprecated schema. Migrate your XML configuration using "--migrate-configuration"! -- There were 2 failures: 1) Drupal\BuildTests\Composer\Template\ComposerProjectTemplatesTest::testTemplateCreateProject with data set "recommended-project" ('drupal/recommended-project', 'composer/Template/RecommendedProject', '/web') COMMAND: COMPOSER_HOME=/tmp/build_workspace_558dd1b0a4860999e23c68f3b3390b60dlYMeC/composer-home COMPOSER_ROOT_VERSION=11.0.6 composer create-project --no-ansi drupal/recommended-project test_project 11.0.6 -vvv --repository /tmp/build_workspace_558dd1b0a4860999e23c68f3b3390b60dlYMeC/test_repository/packages.json OUTPUT: ERROR: Running 2.8.1 (2024-10-04 11:31:01) with PHP 8.3.10 on Linux / 6.8.0-40-generic ...snip... Installing drupal/recommended-project (11.0.6) In PathDownloader.php line 51: [RuntimeException] Source path "composer/Template/RecommendedProject" is not found for package drupal/recommended-project ...snip... Installing drupal/legacy-project (11.0.6) In PathDownloader.php line 51: [RuntimeException] Source path "composer/Template/LegacyProject" is not found for package drupal/legacy-project
(sorry the test output is quite verbose and it's hard to know exactly what might be significant)
- π«π·France andypost
The issue caused by updated CI image so it needs to rollback to 2.7.9
Filed π Fix composer version to 2.7.9 for PHP 8.3 images Active and but it needs to get what's wrong with packaging system using fresh compose
- π¬π§United Kingdom mcdruid π¬π§πͺπΊ
Cool, thanks - I've posted in #drupal-infrastructure in slack as I wasn't sure if it was coincidence that the composer version was bumped here..
Thanks for filing an issue in the right place.
- π«π·France andypost
The issue caused by composer commit, follow-up is π \Drupal\BuildTests\Composer\Template\ComposerProjectTemplatesTest::testTemplateCreateProject breaks with composer 2.8.1 Active
Automatically closed - issue fixed for 2 weeks with no activity.