Skip to content

Do not suggest #[RequiresPhp] on methods that already have it - #6922

Merged
ondrejmirtes merged 1 commit into
2.3.xfrom
skip-tests-requires-php-existing-attribute
Nov 3, 2026
Merged

ondrejmirtes merged 1 commit into
2.3.xfrom
skip-tests-requires-php-existing-attribute

Conversation

@ondrejmirtes

Copy link
Copy Markdown
Member

#[RequiresPhp] is not repeatable, so SkipTestsWithRequiresPhpAttributeRule must not suggest adding it to a test method that already has one. This removes the @phpstan-ignore phpstan.skipTestsRequiresPhp comments that worked around it.

In PropertiesInInterfaceRuleTest::testPhpVersionNarrowedScope, which had no attribute, the rule's suggestion is applied instead.

@ondrejmirtes
ondrejmirtes force-pushed the skip-tests-requires-php-existing-attribute branch 3 times, most recently from 8737614 to 133b53d Compare November 3, 2026 10:22
…eady have #[RequiresPhp]

The attribute is not repeatable, so suggesting another one is wrong.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1a0d3-ad3e-7141-bcfe-124dc73d21ee
@ondrejmirtes
ondrejmirtes force-pushed the skip-tests-requires-php-existing-attribute branch from 133b53d to d37535b Compare November 3, 2026 10:23
@ondrejmirtes
ondrejmirtes merged commit 74f4da6 into 2.3.x Nov 3, 2026
704 checks passed
@ondrejmirtes
ondrejmirtes deleted the skip-tests-requires-php-existing-attribute branch November 3, 2026 10:28
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.

1 participant