cucumber / gherkin

A parser and compiler for the Gherkin language.
MIT License
160 stars 48 forks source link

[PHP] Require PHP 8.2 in composer.json #229

Open olleolleolle opened 4 months ago

olleolleolle commented 4 months ago

This PR is a follow-up to #228.

NEEDS to wait for Psalm to release a version that supports php-parser v5.

🤔 What's changed?

Make the dependency on a non-EOL'd PHP version manifest in composer.json.

⚡️ What's your motivation?

A good comment in #228.

🏷️ What kind of change is this?

olleolleolle commented 4 months ago

Try updating PHP dev deps - that is:

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

  Problem 1
    - Root composer.json requires vimeo/psalm ^5.22.2 -> satisfiable by vimeo/psalm[5.22.2].
    - vimeo/psalm 5.22.2 requires nikic/php-parser ^4.16 -> found nikic/php-parser[v4.16.0, v4.17.0, v4.17.1, v4.18.0] but it conflicts with your root composer.json require (^5.0.1).
  Problem 2
    - psalm/plugin-phpunit 0.18.4 requires vimeo/psalm dev-master || dev-4.x || ^4.7.1 || ^5@beta || ^5.0 -> satisfiable by vimeo/psalm[5.22.2].
    - psalm/plugin-phpunit[0.18.0, ..., 0.18.3] require vimeo/psalm dev-master || dev-4.x || ^4.5 || ^5@beta -> satisfiable by vimeo/psalm[5.22.2].
    - vimeo/psalm 5.22.2 requires nikic/php-parser ^4.16 -> found nikic/php-parser[v4.16.0, v4.17.0, v4.17.1, v4.18.0] but it conflicts with your root composer.json require (^5.0.1).
    - Root composer.json requires psalm/plugin-phpunit ^0.18.0 -> satisfiable by psalm/plugin-phpunit[0.18.0, ..., 0.18.4].

try with a 4.x dep, and now the conflict

  Problem 1
    - phpunit/php-code-coverage 11.0.0 requires nikic/php-parser ^5.0 -> found nikic/php-parser[v5.0.0, v5.0.1] but it conflicts with your root composer.json require (^4.16).
    - phpunit/phpunit[11.0.0, ..., 11.0.3] require phpunit/php-code-coverage ^11.0 -> satisfiable by phpunit/php-code-coverage[11.0.0].
    - Root composer.json requires phpunit/phpunit ^11.0 -> satisfiable by phpunit/phpunit[11.0.0, 11.0.1, 11.0.2, 11.0.3].

So I'd like a psalm that supports php-parser 5.

mpkorstanje commented 4 months ago

@ciaranmcnulty do you think we have a prayer at upgrading this?

olleolleolle commented 3 months ago

@mpkorstanje To me, it seemed like psalm isn't yet ready, but perhaps we can make it ready, by creating a psalm that supports the new parser version?

mpkorstanje commented 3 months ago

Thanks for looking into this. It looks like PHP 8.1 will still get updates so I think we can wait for Psalm to upgrade their parser.