74797[!!!][FEATURE] Add PSR-14 events for the BackendController
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Stefan Bürk +1
-
Verified V +2 Done
- Benni Mack +2
- Stefan Bürk +1
- core-ci +1 CI
Issues 1
Files 7
- typo3/sysext/backend/Classes/Controller/Event/AfterBackendPageRenderEvent.phpnew+48 −0
- typo3/sysext/backend/Classes/Controller/BackendController.php8+4 −34
- typo3/sysext/backend/Tests/Functional/Controller/BackendControllerTest.php2new+72 −0
- typo3/sysext/core/Documentation/Changelog/12.0/Breaking-97451-RemoveBackendControllerPageHooks.rstnew+40 −0
- typo3/sysext/core/Documentation/Changelog/12.0/Feature-97451-PSR-14EventsForBackendPageController.rstnew+53 −0
- typo3/sysext/install/Configuration/ExtensionScanner/Php/ArrayDimensionMatcher.php+18 −0
- typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php+7 −0
Review log 4461
Show 2736 earlier messages
-
crell uploaded patch set 1 05/31/22, 22:20
-
core-ci voted on patch set 1 V +1 05/31/22, 22:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27610
-
Benni Mack commented on patch set 1 05/31/22, 22:54
-
Oliver Klee commented on patch set 1 06/01/22, 09:39
Please let's cover this with tests. (Yes, I know the old hooks were not covered by tests.) -
crell commented on patch set 1 06/01/22, 13:56
Reply
What sort of tests would be appropriate here? It would be straightforward (I think) to add a unit test that verifies that the events trigger, but I'm not certain that is all that valuable.BackendController.php:187ReplyIt looks like $css is only used one other time, to write its value into an inline block. That's probably removable now as well, yes. -
Oliver Klee commented on patch set 1 06/01/22, 13:59
Reply
Yes, exactly that. And for AfterBackendPageRenderEvent, tests that check that the getter + setter work as advertised, and that the content provided to the constructor actually is set. For BeforeBackendPageRenderEvent, a test that the class can be instantiated (to catch typos in class names, namespaced etc.) would be good. -
crell uploaded patch set 2 06/01/22, 19:01
-
crell commented on patch set 2 06/01/22, 19:09
The just-added test is going to fail. I am asking for help with it. One of the deeper dependencies, ShortcutRepository, is failing because the user is invalid. I'm unsure how else to set it, though; the current BE_USER line I copied from another functional test, where it seems to have worked. Please advise. I originally tried to make a pure unit test, but the number of dependencies that would need to be mocked that still get actually used is huge in this case, so I decided it wasn't worth it. Hence just trying to swap out the event dispatcher only. -
core-ci voted on patch set 2 V -1 06/01/22, 19:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27636
-
Oliver Hader commented on patch set 3 06/02/22, 07:08
Published edit on patch set 2. -
Oliver Hader commented on patch set 3 06/02/22, 07:09
Made both events `final` -
core-ci voted on patch set 3 V -1 06/02/22, 07:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27648
-
crell uploaded patch set 4 06/02/22, 17:33
-
crell commented on patch set 4 06/02/22, 17:34
This take on the test should work. Thanks to Mathias Brodala and Oliver Hader for their assistance. -
core-ci voted on patch set 4 V +1 06/02/22, 17:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27659
-
Oliver Hader commented on patch set 4 CR -1 06/03/22, 07:46
On it -
Oliver Hader uploaded patch set 5 06/03/22, 07:48
-
core-ci voted on patch set 5 V +1 06/03/22, 07:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27669
-
Oliver Klee wrote 06/07/22, 17:43
Removed cc Oliver Klee. -
crell commented on patch set 5 CR +1 06/07/22, 19:46
(Since the last patch was from Oliver instead of me.) -
crell uploaded patch set 6 06/07/22, 19:50
-
core-ci voted on patch set 6 V +1 06/07/22, 19:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27777
-
Benni Mack commented on patch set 6 CR +1 06/08/22, 16:16
BackendController.php:150hmm, thinking about this hook... how about we inject the view as well, and render the view after the event? This seems much more flexible than the existing hook? -
Benni Mack voted on patch set 6 CR 0 06/08/22, 16:16
-
crell rebased onto patch set 7 06/09/22, 16:07
-
crell commented on patch set 6 06/09/22, 16:07
BackendController.php:150ReplyDone -
core-ci voted on patch set 7 V +1 06/09/22, 16:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27897
-
crell uploaded patch set 8 06/09/22, 18:08
-
core-ci voted on patch set 8 V +1 06/09/22, 18:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27898
-
crell uploaded patch set 9 06/22/22, 14:08
-
core-ci voted on patch set 9 V +1 06/22/22, 14:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28337
-
Simon Schaufelberger commented on patch set 9 06/22/22, 16:08
BackendController.php:82I'm just looking at the git history where this originally comes from but I don't see a clear intention when this hook got introduced. Do you think it is really useful or could it be dropped because there are no parameters and no return value. -
crell commented on patch set 9 06/22/22, 17:44
BackendController.php:82ReplyAbout all it could do is mess with globals, which AFAIK is something we're trying to do less of. I'd be perfectly happy to kill it if the committers are on board. -
Simon Schaufelberger commented on patch set 9 06/22/22, 20:44
BackendController.php:82Replythe second event makes sense if you want to change the layout but the before event can be dropped in my opinion. -
crell uploaded patch set 10 06/23/22, 17:40
-
crell commented on patch set 9 06/23/22, 17:40
BackendController.php:82ReplyHere's a version with just the one hook. Committers, take your pick.
-
core-ci voted on patch set 10 V -1 06/23/22, 17:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28359
-
Simon Schaufelberger commented on patch set 10 06/23/22, 19:23
Just this thing, the rest looks good to meBackendControllerTest.php:67can be replaced with "$subject = $this->get(BackendController::class);" -
core-ci commented on patch set 10 06/23/22, 21:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28359
-
crell uploaded patch set 11 06/23/22, 21:50
-
core-ci voted on patch set 11 V +1 06/23/22, 21:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28374
-
Simon Schaufelberger commented on patch set 11 V +1 CR +1 06/24/22, 00:07
BackendControllerTest.php:67ReplyDone -
Stefan Bürk commented on patch set 11 06/24/22, 16:58
MockEventDispatcher.php:18This is a "Test Fixture Implementation". So please move this into a "Fixture/" subfolder. ``` typo3/sysect/core/Tests/Fixtures/EventDispatcher/MockEventDispatcher.php ``` -
Stefan Bürk commented on patch set 11 06/24/22, 17:00
MockEventDispatcher.php:18ReplyMy bad - should be: ``` typo3/sysext/core/Tests/Unit/Fixtures/EventDispatcher/MockEventDispatcher.php ``` -
crell uploaded patch set 12 06/27/22, 17:14
-
core-ci voted on patch set 12 V +1 06/27/22, 17:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28442
-
crell commented on patch set 12 06/27/22, 18:52
MockEventDispatcher.php:18ReplyDone -
Simon Schaufelberger voted on patch set 12 V +1 CR +1 06/27/22, 21:30
-
Oliver Hader commented on patch set 12 06/28/22, 08:44
MockEventDispatcher.php:18ReplyDoes not look like `MockEventDispatcher` is used at all?! -
crell commented on patch set 12 06/29/22, 14:11
MockEventDispatcher.php:18Reply... Huh. Yeah, OK, it's left over from the earlier versions of the patch that used that rather than just tossing fake listeners into it. I can pull it back out for now, but there's enough other places where I think it would be useful to have that its worth having it available. I'm not sure if it's worth pulling it back out here to just add it back in later. -
crell uploaded patch set 13 07/06/22, 20:42
-
core-ci voted on patch set 13 V +1 07/06/22, 20:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28693
-
Benni Mack voted on patch set 13 V +1 CR +1 07/06/22, 20:58
-
Stefan Bürk uploaded patch set 14 07/07/22, 20:55
-
core-ci voted on patch set 14 V +1 07/07/22, 21:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28730
-
Stefan Bürk commented on patch set 15 07/07/22, 21:08
Published edit on patch set 14. -
Stefan Bürk voted on patch set 15 V +1 CR +1 07/07/22, 21:08
-
core-ci voted on patch set 15 V -1 07/07/22, 21:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28731
-
core-ci voted on patch set 15 V +1 07/07/22, 21:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28731
-
Benni Mack voted on patch set 15 V +2 CR +2 07/07/22, 22:30
-
Benni Mack merged patch set 16 07/07/22, 22:30
BackendController.php:187