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 Done
    • Christian Kuhn +2
  • Verified V +2 Done
    • Christian Kuhn +2
    • core-ci +1 CI

Issues 1

Files 699

Show 679 more files

Review log 34

  1. Christian Kuhn uploaded patch set 1 02/23/24, 14:21

  2. core-ci voted on patch set 1 V +1 02/23/24, 14:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53504

  3. Christian Kuhn voted on patch set 1 CR +2 V +2 02/23/24, 14:30

  4. Christian Kuhn merged patch set 2 02/23/24, 14:30