Review 12.4 Merged

83091[TASK] Use phpunit attributes over annotations

Christian Kuhn CR +2 V +2 Impossible +6647 −14578 updated 02/23/24, 14:30

Commit message

phpunit 11 deprecates annotations like `@test` and
`@dataProvider` in favor of their attribute counterparts.

We'll adapt core main & v12 to keep v12 backports
simple. The patch takes care of Tests/Unit and
Tests/UnitDeprecated, functional test need some
additional quirk for the test splitter to
continue to work.

> composer req --dev rector/rector
> wget https://forge.typo3.org/attachments/download/38273/rector.php
> find typo3/ -name \*Test.php | grep Tests/Unit | xargs bin/rector process
> rm rector.php
> composer rem --dev rector/rector

Minor manual adaption in ErrorHandlerTest.php and
GeneralUtilityTest.php, and `runTests.sh -s cglGit`.

Number of executed unit tests and unitDeprecated tests
should stay the same.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 699

Show 679 more files