Skip to content

Use a complete version constraint in FiniteTypeSetTest's RequiresPhp attribute - #6177

Merged
VincentLanglet merged 1 commit into
phpstan:2.2.xfrom
SanderMuller:fix-finitetypeset-requiresphp
Aug 3, 2026
Merged

Use a complete version constraint in FiniteTypeSetTest's RequiresPhp attribute#6177
VincentLanglet merged 1 commit into
phpstan:2.2.xfrom
SanderMuller:fix-finitetypeset-requiresphp

Conversation

@SanderMuller

Copy link
Copy Markdown
Contributor

#[RequiresPhp('^8.1')] in FiniteTypeSetTest (added in #6116) is flagged by phpstan-phpunit's phpunit.attributeRequiresPhpVersion rule: ^ is not one of the operators the rule accepts and 8.1 is a two-part, incomplete version. That makes the Infection job's initial static-analysis run exit 1 ("Version requirement is incomplete"), which fails Mutation Testing on every PR branched off current 2.2.x.

This uses >= 8.1.0, the form already used everywhere else in the suite (0 other usages use the caret form). The test still runs on 8.1+ as intended.

…attribute

`#[RequiresPhp('^8.1')]` is flagged by phpstan-phpunit's
phpunit.attributeRequiresPhpVersion rule: the caret is not one of the
operators the rule accepts and `8.1` is a two-part (incomplete) version. That
makes the Infection job's initial static-analysis run fail on every PR branched
off 2.2.x. Use `>= 8.1.0`, the form used everywhere else in the test suite.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@VincentLanglet
VincentLanglet merged commit dddbbfb into phpstan:2.2.x Aug 3, 2026
462 checks passed
@staabm

staabm commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Thanks. I need to fix phpstan-phpunit because warnings changed in newer versions :-)

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.

3 participants