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

Support for PHPUnit 11 #10792

Closed
niconoe- opened this issue Mar 6, 2024 · 5 comments
Closed

Support for PHPUnit 11 #10792

niconoe- opened this issue Mar 6, 2024 · 5 comments

Comments

@niconoe-
Copy link

niconoe- commented Mar 6, 2024

Hi all!

PHPUnit 11 has been released some weeks ago but unfortunatley, Psalm, in its latest version does not support it.

composer.json:

{
    "require": {
        "phpunit/phpunit": "^11",
        "vimeo/psalm": "^5.22"
    }
}

On composer update (or composer install):

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 phpunit/phpunit ^11 -> satisfiable by phpunit/phpunit[11.0.0, ..., 11.1.x-dev].
    - Conclusion: don't install vimeo/psalm 5.22.2 (conflict analysis result)
    - phpunit/php-code-coverage[11.0.0, ..., 11.0.x-dev] require sebastian/lines-of-code ^3.0 -> satisfiable by sebastian/lines-of-code[3.0.0, 3.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.1, 11.0.x-dev].
    - vimeo/psalm[5.22.0, ..., 5.x-dev] require nikic/php-parser ^4.16 -> satisfiable by nikic/php-parser[v4.16.0, ..., 4.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].
    - sebastian/lines-of-code[3.0.0, ..., 3.0.x-dev] require nikic/php-parser ^5.0 -> satisfiable by nikic/php-parser[v5.0.0alpha1, ..., 5.0.x-dev].
    - Conclusion: don't install nikic/php-parser v5.0.2 (conflict analysis result)
    - Root composer.json requires vimeo/psalm ^5.22 -> satisfiable by vimeo/psalm[5.22.0, ..., 5.x-dev].

That means Psalm should require nikic/php-parser:^5.0 too, in order to support PHPUnit 11. As this is a new major version, there are some BCBreaks about upgrading (see https://github.com/nikic/PHP-Parser/blob/master/UPGRADE-5.0.md)

Is there any plan to upgrade? I think can help in participate in any related PR, but I don't think I'll be able to handle this solo.
Do you think this could be a BCBreak on Psalm too so that a version 6 would be required?

Thanks a lot 🙂

Copy link

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

@janopae
Copy link
Contributor

janopae commented Mar 6, 2024

Accordig to #10788 (comment), this is fixed in master and won't be backported to Psalm 5.

@niconoe-
Copy link
Author

niconoe- commented Mar 6, 2024

Oh, snap, I searched for already opened issues for that, but as it was closed, I missed it. Sorry for the duplicate. Thanks a lot for your answer 🙂

@niconoe- niconoe- closed this as not planned Won't fix, can't repro, duplicate, stale Mar 6, 2024
@pontifex
Copy link

pontifex commented Jun 27, 2024

@janopae I assume phpunit in version 11 requires new major release of PSALM (6). Any roadmap already for this? Phpunit 10 bugfix support ends Feburary 2025.

@SharkMachine
Copy link

@janopae I assume phpunit in version 11 requires new major release of PSALM (6). Any roadmap already for this? Phpunit 10 bugfix support ends Feburary 2025.

I'd like to know as well. It can easily take years to get Psalm 6 released. If there is no roadmap for Psalm 6, I think this should be addressed in Psalm 5 as well.

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

4 participants