Skip to content

[PHPUnit70] Add ScenarioToTestAnnotationRector to replace scenario annotation with test - #809

Merged
TomasVotruba merged 1 commit into
mainfrom
tv-scenario-to-test-annotation
Oct 22, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
tv-scenario-to-test-annotation

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

The @scenario annotation was dropped in PHPUnit 7.0. Until now this was handled by a configured RenameAnnotationRector entry in the composer-based set.

This replaces that generic configured call with a dedicated rule that does exactly that: renames @scenario to @test on methods of a test class, version-bound to phpunit/phpunit >=7.0.

  • new ScenarioToTestAnnotationRector (PHPUnit70)
  • registered in the version-bound rules list, next to the other PHPUnit 7.0 rule
  • removes the old RenameAnnotationRector + RenameAnnotationByType config block and now-unused imports

@TomasVotruba
TomasVotruba merged commit 6fa53ef into main Oct 22, 2026
8 checks passed
@TomasVotruba
TomasVotruba deleted the tv-scenario-to-test-annotation branch October 22, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant