[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:Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
core-ci <typo3@b13.com>
Showing
- Build/phpstan/phpstan-baseline.neon 1 addition, 1 deletionBuild/phpstan/phpstan-baseline.neon
- typo3/sysext/adminpanel/Tests/Unit/Middleware/AdminPanelInitiatorTest.php 4 additions, 9 deletions...inpanel/Tests/Unit/Middleware/AdminPanelInitiatorTest.php
- typo3/sysext/adminpanel/Tests/Unit/Modules/PreviewModuleTest.php 5 additions, 7 deletions...ysext/adminpanel/Tests/Unit/Modules/PreviewModuleTest.php
- typo3/sysext/adminpanel/Tests/Unit/Service/ConfigurationServiceTest.php 11 additions, 25 deletions...dminpanel/Tests/Unit/Service/ConfigurationServiceTest.php
- typo3/sysext/adminpanel/Tests/Unit/Service/ModuleLoaderTest.php 9 additions, 17 deletions...sysext/adminpanel/Tests/Unit/Service/ModuleLoaderTest.php
- typo3/sysext/adminpanel/Tests/Unit/Utility/StateUtilityTest.php 16 additions, 32 deletions...sysext/adminpanel/Tests/Unit/Utility/StateUtilityTest.php
- typo3/sysext/backend/Tests/Unit/Configuration/BackendUserConfigurationTest.php 8 additions, 21 deletions...Tests/Unit/Configuration/BackendUserConfigurationTest.php
- typo3/sysext/backend/Tests/Unit/Configuration/TranslationConfigurationProviderTest.php 4 additions, 9 deletions...it/Configuration/TranslationConfigurationProviderTest.php
- typo3/sysext/backend/Tests/Unit/Controller/EditDocumentControllerTest.php 8 additions, 12 deletions...kend/Tests/Unit/Controller/EditDocumentControllerTest.php
- typo3/sysext/backend/Tests/Unit/Controller/Event/AfterPageTreeItemsPreparedEventTest.php 2 additions, 3 deletions.../Controller/Event/AfterPageTreeItemsPreparedEventTest.php
- typo3/sysext/backend/Tests/Unit/Controller/Event/ModifyNewContentElementWizardItemsEventTest.php 5 additions, 7 deletions...ler/Event/ModifyNewContentElementWizardItemsEventTest.php
- typo3/sysext/backend/Tests/Unit/Controller/File/FileControllerTest.php 7 additions, 18 deletions...backend/Tests/Unit/Controller/File/FileControllerTest.php
- typo3/sysext/backend/Tests/Unit/Controller/File/ThumbnailControllerTest.php 6 additions, 6 deletions...nd/Tests/Unit/Controller/File/ThumbnailControllerTest.php
- typo3/sysext/backend/Tests/Unit/Controller/FormInlineAjaxControllerTest.php 12 additions, 31 deletions...nd/Tests/Unit/Controller/FormInlineAjaxControllerTest.php
- typo3/sysext/backend/Tests/Unit/Controller/FormSelectTreeAjaxControllerTest.php 3 additions, 6 deletions...ests/Unit/Controller/FormSelectTreeAjaxControllerTest.php
- typo3/sysext/backend/Tests/Unit/Controller/LoginControllerTest.php 3 additions, 6 deletions...ext/backend/Tests/Unit/Controller/LoginControllerTest.php
- typo3/sysext/backend/Tests/Unit/Controller/SiteConfigurationControllerTest.php 3 additions, 6 deletions...Tests/Unit/Controller/SiteConfigurationControllerTest.php
- typo3/sysext/backend/Tests/Unit/Controller/SwitchUserControllerTest.php 3 additions, 6 deletions...ackend/Tests/Unit/Controller/SwitchUserControllerTest.php
- typo3/sysext/backend/Tests/Unit/Controller/Wizard/SuggestWizardControllerTest.php 8 additions, 14 deletions...ts/Unit/Controller/Wizard/SuggestWizardControllerTest.php
- typo3/sysext/backend/Tests/Unit/ElementBrowser/ElementBrowserRegistryTest.php 5 additions, 12 deletions.../Tests/Unit/ElementBrowser/ElementBrowserRegistryTest.php
Please register or sign in to comment