phpro / grumphp

A PHP code-quality tool
MIT License
4.11k stars 429 forks source link

Magento 2.4.5 with PHP 8.1 incompatibility #1045

Closed mischabraam closed 1 year ago

mischabraam commented 1 year ago
Q A
Version 1.13
Bug? dunno
New feature? no
Question? yes
Documentation? no
Related tickets

Trying to install phpro/grumphp 1.13 with Magento 2.4.5 on PHP 8.1 is not possible due to conflicts on symfony/console version dependencies. See the composer output below:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires symfony/console ^6.1, found symfony/console[v6.1.0, ..., v6.1.4] but these were not loaded, likely because it conflicts with another require.
  Problem 2
    - composer/composer is locked to version 2.2.18 and an update of this package was not requested.
    - composer/composer 2.2.18 requires symfony/console ^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 -> found symfony/console[v2.8.52, v3.4.35, ..., v3.4.47, v4.4.0, ..., v4.4.45, v5.0.0, ..., v5.4.12] but it conflicts with your root composer.json require (^6.1).
  Problem 3
    - magento/product-enterprise-edition is locked to version 2.4.5 and an update of this package was not requested.
    - magento/product-enterprise-edition 2.4.5 requires symfony/console ~4.4.0 -> found symfony/console[v4.4.0, ..., v4.4.45] but it conflicts with your root composer.json require (^6.1).
  Problem 4
    - magento/magento2-functional-testing-framework is locked to version 3.10.3 and an update of this package was not requested.
    - magento/magento2-functional-testing-framework 3.10.3 requires symfony/console ^4.4||^5.4 -> found symfony/console[v4.4.0, ..., v4.4.45, v5.4.0, ..., v5.4.12] but it conflicts with your root composer.json require (^6.1).
  Problem 5
    - Root composer.json requires phpro/grumphp ^1.13 -> satisfiable by phpro/grumphp[v1.13.0].
    - phpro/grumphp v1.13.0 requires symfony/console ~5.3 || ~6.0 -> found symfony/console[v5.3.0, ..., v5.4.12, v6.0.0, ..., v6.1.4] but these were not loaded, likely because it conflicts with another require.

Is it possible to lower the requirement of phpro/grumphp so it works on symfony console ^4.4 ?

veewee commented 1 year ago

See #1028 and #1029

I recommend using the phar version instead.

We will only support 2 major symfony version, because that's about all the pain I can bare maintaining in my spare time. Maybe you have better luck asking the magento team to get their dependencies a bit more up to date.

mischabraam commented 1 year ago

Ow, thanks, totally missed these.