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

Psalm 6.5.0 is broken on Debian 12 (bookworm) #11275

Closed
tavyc opened this issue Feb 10, 2025 · 6 comments
Closed

Psalm 6.5.0 is broken on Debian 12 (bookworm) #11275

tavyc opened this issue Feb 10, 2025 · 6 comments

Comments

@tavyc
Copy link

tavyc commented Feb 10, 2025

When running Psalm 6.5.0 on Debian 12 (bookworm) with PHP 8.2.26-1~deb12u1:

Psalm has detected issues in your platform:
Psalm requires a PHP version ">= 8.2.27". You are running 8.2.26.

This was a surprise, as the requirement is not specified by Psalm's composer.json.

Please revert the internal version check in CliUtils::checkRuntimeRequirements,
or specify the proper requirement(s) in composer.json so Composer will be able to select a lower Psalm 6.x version on Debian 12.

Please note that Debian backports security fixes from the latest PHP releases into their stable PHP version (currently 8.2.26).

Copy link

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

@danog
Copy link
Collaborator

danog commented Feb 10, 2025

Please use the ondrej PPA repos on Ubuntu and debian, 8.2.26 is not usable due to platform (non-security) PHP bugs.

@danog danog closed this as completed Feb 10, 2025
@corubba
Copy link

corubba commented Feb 12, 2025

This was fixed in v6.5.1, and composer will realise being unable to satisfy the requirements for it. So it falls back to the latest previous version where it can satisfy them, which is v6.5.0. And while that can be successfully installed, it will complain about the php version when actually used. Would it be possible to yank 6.5.0 from the composer repository, so composer properly falls back to the actually usable v6.4.1?

EDIT: Reading #11270, this is intentional. And thus unlikely to be changed.

@nmeri17
Copy link

nmeri17 commented Feb 16, 2025

This was fixed in v6.5.1, and composer will realise being unable to satisfy the requirements for it. So it falls back to the latest previous version where it can satisfy them, which is v6.5.0. And while that can be successfully installed, it will complain about the php version when actually used. Would it be possible to yank 6.5.0 from the composer repository, so composer properly falls back to the actually usable v6.4.1?

EDIT: Reading #11270, this is intentional. And thus unlikely to be changed.

It is really sad how stubborn he is, deaf to the voice of reason. SMH

@danog
Copy link
Collaborator

danog commented Feb 16, 2025

As mentioned in the comment, asking users to upgrade to the latest patch version of PHP to avoid unexpected bugs is not unreasonable.

On debian, just switch to the ondrej repos: https://deb.sury.org/

@nmeri17
Copy link

nmeri17 commented Feb 16, 2025

@danog nobody suggests upgrading to latest php patches. Ocramius showed you how to use ranges to specify which php releases are compatible with your library's versions. This is the first time I'm ever seeing this hard requirement in the php world. Why do I need to have that very specific php copy in order to run psalm?

I honestly don't care about jit. I just need the good old static analysis. I'm on windows, not debian

Anyway, no need crying over spilt milk. Thankfully, older versions don't have this so we're good. I would rather downgrade to a functional psalm than pull an entirely fresh php installation just for 20% psalm performance gains

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