Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing psalm and phpunit 11 with composer #10658

Closed
thbley opened this issue Feb 5, 2024 · 4 comments
Closed

Installing psalm and phpunit 11 with composer #10658

thbley opened this issue Feb 5, 2024 · 4 comments

Comments

@thbley
Copy link
Contributor

thbley commented Feb 5, 2024

Currently it's not possible to install psalm and phpunit 11 with composer.

e.g. using composer.json

"require": {
        "phpunit/phpunit": "^11",
        "vimeo/psalm": "^5"
}
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - sebastian/diff[4.0.0, ..., 4.0.1] require php ^7.3 -> your php version (8.2; overridden via config.platform, actual: 8.2.15) does not satisfy that requirement.
    - vimeo/psalm[5.5.0, ..., 5.21.1] require sebastian/diff ^4.0 || ^5.0 -> satisfiable by sebastian/diff[4.0.0, ..., 4.0.5, 5.0.0, ..., 5.1.0].
    - vimeo/psalm[5.0.0, ..., 5.4.0] require sebastian/diff ^4.0 -> satisfiable by sebastian/diff[4.0.0, ..., 4.0.5].
    - You can only install one version of a package, so only one of these can be installed: sebastian/diff[4.0.0, ..., 4.0.5, 5.0.0, ..., 5.1.0, 6.0.0].
    - phpunit/phpunit[11.0.0, ..., 11.0.2] require sebastian/diff ^6.0 -> satisfiable by sebastian/diff[6.0.0].
    - Root composer.json requires phpunit/phpunit ^11 -> satisfiable by phpunit/phpunit[11.0.0, 11.0.1, 11.0.2].
    - Root composer.json requires vimeo/psalm ^5 -> satisfiable by vimeo/psalm[5.0.0, ..., 5.21.1].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Copy link

Hey @thbley, can you reproduce the issue on https://psalm.dev? These will be used as phpunit tests when implementing the feature or fixing this bug.

@weirdan
Copy link
Collaborator

weirdan commented Feb 5, 2024

Already fixed in #10639

@weirdan weirdan closed this as not planned Won't fix, can't repro, duplicate, stale Feb 5, 2024
@MarcHagen
Copy link

MarcHagen commented Feb 9, 2024

Still seems a issue with the dev version of psalm.
But could the the 8.3 constrained?

  "require": {
  },
  "require-dev": {
    "vimeo/psalm": "5.x-dev",
    "phpunit/phpunit": "^11.0"
  },
  Problem 1
    - Root composer.json requires vimeo/psalm 5.x-dev -> satisfiable by vimeo/psalm[5.x-dev].
    - phpunit/php-code-coverage[11.0.0, ..., 11.0.x-dev] require nikic/php-parser ^5.0 -> satisfiable by nikic/php-parser[v5.0.0alpha1, ..., 5.0.x-dev].
    - You can only install one version of a package, so only one of these can be installed: nikic/php-parser[v4.16.0, ..., 4.x-dev, v5.0.0alpha1, ..., 5.0.x-dev].
    - phpunit/phpunit[11.0.0, ..., 11.1.x-dev] require phpunit/php-code-coverage ^11.0 -> satisfiable by phpunit/php-code-coverage[11.0.0, 11.0.x-dev].
    - vimeo/psalm 5.x-dev requires nikic/php-parser ^4.16 -> satisfiable by nikic/php-parser[v4.16.0, ..., 4.x-dev].
    - vimeo/psalm 5.x-dev conflicts with nikic/php-parser v4.17.0.
    - Root composer.json requires phpunit/phpunit ^11.0 -> satisfiable by phpunit/phpunit[11.0.0, ..., 11.1.x-dev].

@weirdan
Copy link
Collaborator

weirdan commented Feb 10, 2024

Most likely we won't be supporting nikic/php-parser v5 in 5.x branch. master branch (future Psalm 6) already uses nikic/php-parser though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants