Problem/Motivation

This is blocker to upgrade composer for 10.4.x #3478331: Upgrade composer to 2.8.1 for PHP 8.4

Steps to reproduce

$ composer update composer/composer:2.8.0 -W
> Drupal\Composer\Composer::ensureComposerVersion
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires composer/composer ^2.7.7 -> satisfiable by composer/composer[2.8.0].
    - composer/composer 2.8.0 requires composer/pcre ^2.2 || ^3.2 -> satisfiable by composer/pcre[2.2.0, 2.3.0, 2.3.1, 2.x-dev, 3.2.0, 3.3.0, 3.3.1, 3.x-dev].
    - composer/pcre[2.3.0, ..., 2.x-dev, 3.3.0, ..., 3.x-dev] conflict with phpstan/phpstan <1.11.10.
    - composer/pcre[2.2.0, 3.2.0] conflict with phpstan/phpstan <1.11.8.
    - phpstan/phpstan is locked to version 1.11.0 and an update of this package was not requested.

Proposed resolution

Upgrade phpstan/phpstan to 1.11.10 as 11.x branch is using

Remaining tasks

get rid of failures, review, commit

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3478504

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

andypost created an issue. See original summary.

andypost’s picture

Status: Active » Needs review

composer update phpstan/phpstan:1.11.10

changes

+-----------------+--------+---------+
| Dev Changes     | From   | To      |
+-----------------+--------+---------+
| phpstan/phpstan | 1.11.0 | 1.11.10 |
+-----------------+--------+---------+
smustgrave’s picture

Status: Needs review » Needs work

So looking at #3463954: Bump phpstan/phpstan to latest to make daily "updated deps" QA run pass again I see we upgrade to 1.11.8 for 11.x. If going to 1.11.10 for 10.4 think we should make sure 11.x and 10.4.x are inline.

andypost’s picture

Status: Needs work » Needs review

11.x already using it, I pointed it summary) but the issue fixes preg usage to prevent extending baseline so I just backported fixes from the commit and extended fix for book module which is absent in 11

andypost’s picture

andypost’s picture

Now composer.json is the same for phpstan/phpstan

Probably some follow-up to align versions with 11.x could be requested by commiter as the diff not as big

core$ git diff 11.x -- composer.json
diff --git a/composer.json b/composer.json
index 471b12d516a..8984e097436 100644
--- a/composer.json
+++ b/composer.json
@@ -9,7 +9,7 @@
         "chat": "https://www.drupal.org/node/314178"
     },
     "require": {
-        "composer/installers": "^2.3",
+        "composer/installers": "^2.0",
         "drupal/core": "self.version",
         "drupal/core-project-message": "self.version",
         "drupal/core-vendor-hardening": "self.version"
@@ -21,9 +21,9 @@
         "composer/composer": "^2.7.7",
         "drupal/coder": "^8.3.10",
         "justinrainbow/json-schema": "^5.2",
-        "lullabot/mink-selenium2-driver": "^1.7.3",
-        "lullabot/php-webdriver": "^2.0.5",
-        "mglaman/phpstan-drupal": "^1.2.11",
+        "lullabot/mink-selenium2-driver": "^1.7",
+        "lullabot/php-webdriver": "^2.0.4",
+        "mglaman/phpstan-drupal": "^1.2.10",
         "micheh/phpcs-gitlab": "^1.1",
         "mikey179/vfsstream": "^1.6.11",
         "open-telemetry/exporter-otlp": "^1",
@@ -33,22 +33,21 @@
         "phpstan/extension-installer": "^1.1",
         "phpstan/phpstan": "^1.11.10",
         "phpstan/phpstan-phpunit": "^1.3.16",
-        "phpunit/phpunit": "^10.5.19",
-        "symfony/browser-kit": "^7.1",
-        "symfony/css-selector": "^7.1",
-        "symfony/dom-crawler": "^7.1",
-        "symfony/error-handler": "^7.1",
-        "symfony/lock": "^7.1",
-        "symfony/var-dumper": "^7.1"
+        "phpunit/phpunit": "^9.6.13",
+        "symfony/browser-kit": "^6.4",
+        "symfony/css-selector": "^6.4",
+        "symfony/dom-crawler": "^6.4",
+        "symfony/error-handler": "^6.4",
+        "symfony/lock": "^6.4",
+        "symfony/phpunit-bridge": "^6.4",
+        "symfony/var-dumper": "^6.4"
     },
     "replace": {
         "symfony/polyfill-php72": "*",
         "symfony/polyfill-php73": "*",
         "symfony/polyfill-php74": "*",
         "symfony/polyfill-php80": "*",
-        "symfony/polyfill-php81": "*",
-        "symfony/polyfill-php82": "*",
-        "symfony/polyfill-php83": "*"
+        "symfony/polyfill-php81": "*"
     },
     "minimum-stability": "dev",
     "prefer-stable": true,
smustgrave’s picture

andypost’s picture

  • longwave committed 8e8e0f4c on 10.4.x
    Issue #3478504 by andypost: upgrade phpstan to 1.11.10 for 10.4.x
    
longwave’s picture

Status: Reviewed & tested by the community » Fixed

Committed 8e8e0f4 and pushed to 10.4.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.