Review main Merged Breaking

74798[!!!][FEATURE] Add PSR-14 events for the Link Browser

crell CR +2 V +2 Hard +353 −19 updated 07/08/22, 23:42

Commit message

This introduces two new events to replace the old modify hooks
in LinkBrowser.  They are a direct 1:1 replacement.

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

Review log 2232

Show 47 earlier messages
  1. crell uploaded patch set 1 06/01/22, 00:24

  2. core-ci voted on patch set 1 V +1 06/01/22, 00:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27612

  3. crell uploaded patch set 2 06/01/22, 21:40

  4. core-ci voted on patch set 2 V +1 06/01/22, 21:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27637

  5. crell uploaded patch set 3 06/02/22, 22:50

  6. core-ci voted on patch set 3 V +1 06/02/22, 22:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27662

  7. Georg Ringer commented on patch set 3 06/03/22, 03:23

    Feature-97454-PSR14EventsForLinkBrowserLifecycle.rst:25

    IMO there needs to be an empty line after the .. code-block
  1. Oliver Hader commented on patch set 3 CR -1 06/03/22, 07:51

    Feature-97454-PSR14EventsForLinkBrowserLifecycle.rst:25 Reply

    yes

    BrowseLinksControllerTest.php:102

    I guess this can be simplified by using DI directly - we're in the scope of a functional test. This avoids explicitly calling all injectors and potentially would break anytime the subject extends (auto-wired) dependencies. tl;dr: use DI in a functional test
  2. Oliver Hader commented on patch set 3 06/03/22, 07:53

    Breaking-97451-RemoveLinkBrowserHooks.rst

    wrong file name
  3. Oliver Hader commented on patch set 3 06/03/22, 07:55

    BrowseLinksControllerTest.php:18

    oooh
  4. Oliver Hader uploaded patch set 4 06/03/22, 08:03

  5. Oliver Hader commented on patch set 4 CR -1 06/03/22, 08:05

    I just fixed the simple/obvious things. The scope, namespace, DI-stack of the test-case still needs to be fixed - the location of the test in the file-system also seems to be wrong. I'd probably go with `\TYPO3\CMS\Backend\Controller\LinkBrowserController` or create a fixture-class for that particular case, extending `\TYPO3\CMS\Recordlist\Controller\AbstractLinkBrowserController`.
  6. core-ci voted on patch set 4 V -1 06/03/22, 08:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27670

  7. crell commented on patch set 3 06/03/22, 14:59

    Breaking-97451-RemoveLinkBrowserHooks.rst Reply

    What's the right file name then? Typo or did I miss a naming convention?

    BrowseLinksControllerTest.php:102 Reply

    I tried that originally and was getting a service-not-found error on Richtext. I'm not entirely clear why, but switching to this approach (which is used in many tests elsewhere) resolved that issue. I'm fine switching back to just getting BrowserLinksController out of the container if someone can advise on how to avoid the problem with Richtext.
  8. crell commented on patch set 4 06/03/22, 15:07

    Feature-97454-PSR14EventsForLinkBrowserLifecycle.rst:25 Reply

    Done

    BrowseLinksControllerTest.php:18 Reply

    Sometimes I hate my IDE. (It's confused by the directory structure.)
  9. crell commented on patch set 4 06/03/22, 15:13

    Breaking-97451-RemoveLinkBrowserHooks.rst Reply

    Oh, the ID.
  10. crell uploaded patch set 5 06/03/22, 15:18

  11. core-ci voted on patch set 5 V +1 06/03/22, 15:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27686

  12. Stefan Bürk commented on patch set 5 CR -1 06/03/22, 16:28

    BrowseLinksControllerTest.php:102 Reply

    Given the namespace, you are instantiatinv the BrowseLinksController from ext:rte_ckeditor. rte_ckeditor is a core extension not loaded by default. Telling the test case to load the extension with ``` protected array $coreExtensionsToLoad = [ 'rte_ckeditor', ]; ``` will properly add the corresponding Services.yaml into the depdency injection chain. Instead of manual instanciating the controller, you then can use: ``` $subject = $this->get(BrowseLinksController::class); ``` This is a hard cross extension thing - but as this test is about the "events" it may be good here .. but not really sure which would be the best for this cross-extension dilema. Testing the controller it belongs and tests the events there "again" and using here a test extension .... here opinion of other people is highly encouraged.
  13. crell uploaded patch set 6 06/03/22, 18:50

  14. crell commented on patch set 5 06/03/22, 18:51

    BrowseLinksControllerTest.php:102 Reply

    That works, thanks. Patch updated. I have no strong feelings about the cross-extension question. If there's a better extension to put the tests in, I can move it. The goal here is just to make sure the best class's events fire.
  15. core-ci voted on patch set 6 V -1 06/03/22, 18:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27694

  16. core-ci commented on patch set 6 06/03/22, 20:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27694

  17. core-ci voted on patch set 6 V +1 06/03/22, 20:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27694

  18. crell commented on patch set 6 06/07/22, 20:33

    Holding off on rebasing for merge conflict until https://review.typo3.org/c/Packages/TYPO3.CMS/+/74797 is committed, since they're both adding stuff to the end of ArrayDimensionsMatcher.php.
  19. crell uploaded patch set 7 07/08/22, 14:14

  20. core-ci voted on patch set 7 V +1 07/08/22, 14:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28759

  21. Stefan Bürk uploaded patch set 8 07/08/22, 20:19

  22. core-ci voted on patch set 8 V +1 07/08/22, 20:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28776

  23. Stefan Bürk commented on patch set 8 V +1 CR +1 07/08/22, 20:33

    BrowseLinksControllerTest.php:102 Reply

    Done
  24. Benni Mack voted on patch set 8 V +2 CR +2 07/08/22, 23:42

  25. Benni Mack merged patch set 9 07/08/22, 23:42