Skip to content
Snippets Groups Projects
Commit 7e84231b authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Use phpunit attributes over annotations

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.

Change-Id: I63d2be40b8aa022f0918edd8dc1c360017316c46
Resolves: #103180
Releases: main, 12.4
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83091


Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarcore-ci <typo3@b13.com>
parent 20922f3b
Showing
with 123 additions and 248 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment