Skip to content

update phpstan/phpstan-phpunit#5972

Draft
staabm wants to merge 2 commits into
phpstan:2.2.xfrom
staabm:up-unit
Draft

update phpstan/phpstan-phpunit#5972
staabm wants to merge 2 commits into
phpstan:2.2.xfrom
staabm:up-unit

Conversation

@staabm

@staabm staabm commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@staabm

staabm commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

the errors we see here are related to phpstan-src analyzing the codebase with a fixed PHP_VERSION_ID and the phpversion is compared since phpstan/phpstan-phpunit#269 against #[RequiresPhp('<= 8.5')].

I am not yet sure how/where to fix it properly

@ondrejmirtes

Copy link
Copy Markdown
Member

Why is this rule reporting a problem in this situation when an ordinary PHP_VERSION_ID < 80200 does not?

Also I'd argue the error message of the rule should be improved. "Version requirement will always evaluate to false." doesn't tell the left and right side of the comparison (and also what the comparison is). All of that would improve the error message.

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

Successfully merging this pull request may close these issues.

2 participants