Review 12.4 Merged

83129[TASK] Use phpunit attributes in functional tests

Christian Kuhn CR +2 V +2 Impossible +4719 −11152 updated 02/26/24, 09:42

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/Functional and
Tests/FunctionalDeprecated.

Script `Build/Scripts/splitFunctionalTests.php` is
adapted to deal with annotations for CI to continue
splitting functional tests into chunks. This also
fixes detection in two test cases that had unexpected
`@test` annotation combinations which were not properly
detected before.

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

Minor manual adaption in a few files plus cgl fixes.

Also deny `@test` annotion in annotationChecker.php now
to not introduce new occurences with other patches anymore.
The script will receive another cleanup to look at further
obsolete annotations. `@dataProvider` is currently still
used in acceptance tests.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
  • Verified V +2 Done
    • Christian Kuhn +2
    • core-ci +1 CI

Issues 2

Files 493

Show 473 more files

Review log 58

  1. Christian Kuhn uploaded patch set 1 02/26/24, 09:12

  2. core-ci voted on patch set 1 V -1 02/26/24, 09:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53589

  3. Christian Kuhn uploaded patch set 2 V -1 02/26/24, 09:21

  4. core-ci voted on patch set 2 V -1 02/26/24, 09:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53590

  5. Christian Kuhn uploaded patch set 3 V -1 02/26/24, 09:32

  6. core-ci voted on patch set 3 V +1 02/26/24, 09:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53591

  7. Christian Kuhn voted on patch set 3 CR +2 V +2 02/26/24, 09:40

  8. Christian Kuhn merged patch set 4 02/26/24, 09:42