92995[FEATURE] Add event after page URI generation
Commit message
Review
-
Code review CR +2 Done
- Georg Ringer +2
- Benni Mack +1
-
Verified V +2 Done
- Georg Ringer +2
- Benni Mack +1
- core-ci +1 CI
Issues 1
Files 5
- typo3/sysext/core/Classes/Routing/Event/AfterPageUriGeneratedEvent.php2new+76 −0
- typo3/sysext/core/Classes/Routing/PageRouter.php4+15 −8
- typo3/sysext/core/Documentation/Changelog/14.2/Feature-92780-IntroduceAfterPageUriGeneratedEvent.rstnew+80 −0
- typo3/sysext/core/Tests/Unit/Routing/PageRouterTest.php+4 −0
- typo3/sysext/frontend/Tests/Functional/SiteHandling/PageRouterTest.php+44 −0
Review log 2128
Show 23 earlier messages
-
Sebastian Michaelsen uploaded patch set 1 02/25/26, 14:22
-
Mathias Brodala commented on patch set 1 02/25/26, 14:26
-
core-ci voted on patch set 1 V -1 02/25/26, 14:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96826
-
Sebastian Michaelsen commented on patch set 1 02/25/26, 14:50
PageRouter.php:408ReplyThat's more difficult than it looks. That makes other unit tests such as PageRouterTest fail. It results in "Cannot instantiate interface Psr\EventDispatcher\EventDispatcherInterface" because those unit tests instantiate PageRouter without a fully bootstrapped DI container (or a pre-registered dispatcher singleton), so resolving EventDispatcherInterface in the constructor happens too early and GeneralUtility::makeInstance() has no concrete implementation to return. -
Mathias Brodala commented on patch set 1 02/25/26, 14:54
PageRouter.php:408ReplyThen you'll need to extend the existing mocking accordingly. -
Sebastian Michaelsen uploaded patch set 2
V -102/25/26, 14:55 -
Sebastian Michaelsen uploaded patch set 3 02/25/26, 15:03
-
Sebastian Michaelsen commented on patch set 3 02/25/26, 15:10
PageRouter.php:408ReplyAcknowledged -
core-ci voted on patch set 2 V +1 02/25/26, 15:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96828
-
core-ci voted on patch set 3 V +1 02/25/26, 15:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96831
-
Amir Arends commented on patch set 3 02/26/26, 06:48
Thank you @sebastian@michaelsen.io. It is really very valuable. In our use case, we need to adjust the final URL dynamically based on active campaign, which is only fully available after generation. Currently, this requires a patch, so a dedicated hook or event would make this much cleaner and more maintainable. -
Georg Ringer voted on patch set 3 CR +1 V +1 02/27/26, 13:16
-
Benni Mack commented on patch set 3 CR -2 02/27/26, 13:24
will be reviewing this thorougly -
Sebastian Michaelsen commented on patch set 3 CR -1 03/07/26, 14:42
AfterPageUriGeneratedEvent.php:28This and its getter should be typed `array|string|int|Page` instead of mixed. I'll fix this when I have Benni's feedback. -
Sebastian Michaelsen rebased onto patch set 4
CR +1V +103/19/26, 14:48Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
Sebastian Michaelsen commented on patch set 4 03/19/26, 14:49
AfterPageUriGeneratedEvent.php:28ReplyDone -
Sebastian Michaelsen uploaded patch set 5 03/19/26, 14:49
Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
core-ci voted on patch set 4 V +1 03/19/26, 15:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98238
-
core-ci voted on patch set 5 V -1 03/19/26, 15:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98240
-
core-ci voted on patch set 5 V +1 03/20/26, 09:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98240
-
Benni Mack commented on patch set 5 CR +1 V +1 03/22/26, 10:24
this is a very powerful (you know - great power, great responsibility) event. I usually refrain to "AfterLinkIsGeneratedEvent", but this one is obviously needed for other cases. -
Benni Mack commented on patch set 5 03/22/26, 10:25
Reply
we "could" document this in the RST, that this is affected in more places (also generated from the backend etc) -
Sebastian Michaelsen uploaded patch set 6
CR +1V +103/23/26, 11:25 -
Sebastian Michaelsen commented on patch set 6 03/23/26, 11:27
Reply
very valid and helpful remark. to be honest I was not aware of the width of the impact this event might have. I took your comment to investigate which features of TYPO3 can be affected by this and hopefully made the power/responsibility clear in the rst document. -
core-ci voted on patch set 6 V +1 03/23/26, 11:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98460
-
Benni Mack commented on patch set 6 CR +1 V +1 03/26/26, 17:06
thx! -
Georg Ringer voted on patch set 6 CR +2 V +2 03/26/26, 19:24
-
Georg Ringer merged patch set 7 03/26/26, 19:24
PageRouter.php:408