[TASK] Avoid usages of TYPO3_MODE
All code that is using the constant TYPO3_MODE is hard to test, as this needs to be encapsulated into various places. All testing framework places run with TYPO3_MODE=FE which makes it impossible to even consider making parts of the testing framework compatible running a pure Frontend-based request in the future. On top, the constant covers up cross-dependency between core dependencies (whereas $GLOBALS[TSFE]->fe_user is actually a dependency to EXT:frontend). Another testing-helper in Extbase's EnvironmentService allows to switch within Extbase to simulate Frontend behaviour. Resolves: #91521 Releases: master, 10.4 Change-Id: I85a34029e399b40d0780f907480f9059bfdb0edb Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64598 Tested-by:TYPO3com <noreply@typo3.com> Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Tested-by:
Benjamin Franzke <bfr@qbus.de> Reviewed-by:
Wouter Wolters <typo3@wouterwolters.nl> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Benjamin Franzke <bfr@qbus.de>
Showing
- typo3/sysext/backend/Classes/Template/ModuleTemplate.php 1 addition, 1 deletiontypo3/sysext/backend/Classes/Template/ModuleTemplate.php
- typo3/sysext/core/Classes/Authentication/AuthenticationService.php 5 additions, 5 deletions...ext/core/Classes/Authentication/AuthenticationService.php
- typo3/sysext/core/Classes/Collection/RecordCollectionRepository.php 4 additions, 3 deletions...xt/core/Classes/Collection/RecordCollectionRepository.php
- typo3/sysext/core/Classes/FormProtection/FormProtectionFactory.php 2 additions, 1 deletion...ext/core/Classes/FormProtection/FormProtectionFactory.php
- typo3/sysext/core/Classes/Messaging/FlashMessageQueue.php 6 additions, 1 deletiontypo3/sysext/core/Classes/Messaging/FlashMessageQueue.php
- typo3/sysext/core/Classes/Resource/AbstractRepository.php 3 additions, 2 deletionstypo3/sysext/core/Classes/Resource/AbstractRepository.php
- typo3/sysext/core/Tests/Functional/Fixtures/Frontend/AdditionalConfiguration.php 2 additions, 4 deletions.../Functional/Fixtures/Frontend/AdditionalConfiguration.php
- typo3/sysext/core/Tests/Unit/Authentication/AuthenticationServiceTest.php 4 additions, 0 deletions...e/Tests/Unit/Authentication/AuthenticationServiceTest.php
- typo3/sysext/extbase/Classes/Service/EnvironmentService.php 31 additions, 1 deletiontypo3/sysext/extbase/Classes/Service/EnvironmentService.php
- typo3/sysext/form/Classes/Domain/Runtime/FormRuntime.php 4 additions, 4 deletionstypo3/sysext/form/Classes/Domain/Runtime/FormRuntime.php
Please register or sign in to comment