[FEATURE] Introduce new PSR-14 BeforeRedirectMatchDomainEvent
A new PSR-14 event `BeforeRedirectMatchDomainEvent` is introduced to the RedirectService, allowing extension authors to implement a custom redirect matching. This can be used to implement custom logic to match the request and determine a redirect. For example, dealing with `GET` request params and changing the target based on the value of an parameter. Therefore, special and rare use-cases can be implemented avoiding complex all-scenario match logic in the core and keeping it to a generic and overall cases in the core-implementation. Resolves: #99803 Releases: main Change-Id: I1819c3cd27b6a764000b61dc9cde580fa3b6d40d Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77675 Reviewed-by:Stefan Bürk <stefan@buerk.tech> Tested-by:
Guido Schmechel <guido.schmechel@brandung.de> Tested-by:
Georg Ringer <georg.ringer@gmail.com> Reviewed-by:
Georg Ringer <georg.ringer@gmail.com> Reviewed-by:
Guido Schmechel <guido.schmechel@brandung.de> Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
core-ci <typo3@b13.com>
Showing
- typo3/sysext/core/Documentation/Changelog/12.3/Feature-99803-NewPSR-14BeforeRedirectMatchDomainEvent.rst 108 additions, 0 deletions...Feature-99803-NewPSR-14BeforeRedirectMatchDomainEvent.rst
- typo3/sysext/redirects/Classes/Event/BeforeRedirectMatchDomainEvent.php 86 additions, 0 deletions...edirects/Classes/Event/BeforeRedirectMatchDomainEvent.php
- typo3/sysext/redirects/Classes/Service/RedirectService.php 19 additions, 20 deletionstypo3/sysext/redirects/Classes/Service/RedirectService.php
- typo3/sysext/redirects/Tests/Functional/Service/Fixtures/BeforeRedirectMatchDomainEventIsTriggered.csv 3 additions, 0 deletions...ce/Fixtures/BeforeRedirectMatchDomainEventIsTriggered.csv
- typo3/sysext/redirects/Tests/Functional/Service/IntegrityServiceTest.php 2 additions, 0 deletions...directs/Tests/Functional/Service/IntegrityServiceTest.php
- typo3/sysext/redirects/Tests/Functional/Service/RedirectServiceTest.php 66 additions, 1 deletion...edirects/Tests/Functional/Service/RedirectServiceTest.php
- typo3/sysext/redirects/Tests/Unit/Event/BeforeRedirectMatchDomainEventTest.php 53 additions, 0 deletions...s/Tests/Unit/Event/BeforeRedirectMatchDomainEventTest.php
- typo3/sysext/redirects/Tests/Unit/Service/RedirectServiceTest.php 3 additions, 2 deletions...sext/redirects/Tests/Unit/Service/RedirectServiceTest.php
Please register or sign in to comment