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

fix: PhpUnitAttributesFixer - fix for #[RequiresPhp] exceeding its constructor parameters #7966

Merged
merged 2 commits into from Apr 22, 2024

Conversation

paulbalandan
Copy link
Contributor

If the annotation is:

/**
 * @requires PHP >= 8.1
 */

this will become:

#[\PHPUnit\Framework\Attributes\RequiresPhp('>=', '8.1')]

which is wrong since the attribute accepts only one parameter. Ref: https://docs.phpunit.de/en/10.5/attributes.html#requiresphp

During parsing, this will error and cause PHPUnit to crash.

@coveralls
Copy link

Coverage Status

coverage: 96.053%. remained the same
when pulling 3039103 on paulbalandan:fix-php-unit-attributes
into 5c6b9a4 on PHP-CS-Fixer:master.

@Wirone Wirone merged commit 4edae7d into PHP-CS-Fixer:master Apr 22, 2024
27 checks passed
@Wirone
Copy link
Member

Wirone commented Apr 22, 2024

Thank you @paulbalandan and welcome back 🙂.

@paulbalandan paulbalandan deleted the fix-php-unit-attributes branch April 22, 2024 17:46
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.

None yet

3 participants