Review main Merged

76663[FEATURE] Introduce PSR-14 event to define whether files are selectable

Stefan Froemken CR +2 V +2 Normal +198 −2 updated 12/01/22, 22:33

Commit message

This introduces a new PSR-14 event, enabling
extension authors to define whether a file
can be selected in the file browser. This was
previously only possible by cross classing the
FileBrowser class.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Andreas Kienast +1
    • Benni Mack +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Andreas Kienast +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 3139

Show 1114 earlier messages
  1. Stefan Froemken uploaded patch set 1 11/17/22, 12:11

  2. core-ci voted on patch set 1 V +1 11/17/22, 12:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33867

  3. Chris Müller commented on patch set 1 CR -1 11/17/22, 15:56

    Please move the feature rst into the 12.1 folder.
  4. Chris Müller uploaded patch set 2 11/17/22, 17:00

  5. Christian Kuhn commented on patch set 2 11/17/22, 17:03

    FileBrowser.php:77

    private readonly EventDispatcher $eventDispatcher
  6. core-ci voted on patch set 2 V +1 11/17/22, 17:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33881

  7. Christian Kuhn commented on patch set 2 11/17/22, 18:55

    FileBrowser.php:77 Reply

    forget this. this is not cool in inject* methods.
  8. Christian Kuhn uploaded patch set 3 11/17/22, 18:59

  9. Stefan Bürk voted on patch set 3 V +1 CR +1 11/17/22, 19:02

  10. Christian Kuhn voted on patch set 3 V +1 CR +1 11/17/22, 19:02

  11. Anja Leichsenring voted on patch set 3 V +1 CR +1 11/17/22, 19:03

  12. core-ci voted on patch set 3 V +1 11/17/22, 19:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33889

  13. Benni Mack voted on patch set 3 CR -2 11/17/22, 19:12

  14. Benni Mack voted on patch set 3 CR 0 11/17/22, 19:16

  1. Stefan Bürk voted on patch set 3 V 0 CR 0 11/17/22, 20:26

  2. Christian Kuhn commented on patch set 3 V 0 CR 0 11/17/22, 20:26

    still need to figure out naming things.
  3. Benni Mack commented on patch set 3 CR -1 11/18/22, 08:16

    will work on this
  4. Oli Bartsch uploaded patch set 4 CR +1 V +1 12/01/22, 14:46

  5. core-ci voted on patch set 4 V +1 12/01/22, 14:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34502

  6. Andreas Kienast commented on patch set 4 CR -1 12/01/22, 15:13

    IsFileSelectableEvent.php:55

    typo: selection

    Feature-99118-PSR-14EventToDefineWhetherFilesAreSelectable.rst:25

    typo: selection
  7. Oli Bartsch uploaded patch set 5 CR -1 V +1 12/01/22, 15:15

  8. Oli Bartsch commented on patch set 5 12/01/22, 15:15

    IsFileSelectableEvent.php:55 Reply

    Done

    Feature-99118-PSR-14EventToDefineWhetherFilesAreSelectable.rst:25 Reply

    Done
  9. Andreas Kienast rebased onto patch set 6 12/01/22, 15:17

  10. Andreas Kienast commented on patch set 6 12/01/22, 15:22

    IsFileSelectableEvent.php:31

    I wonder if we really need `$imageDimensions` here. The same data can be fetched via `$file->getProperty('width')` and `$file->getProperty('height')`. Also, this array is always empty for e.g. text files.
  11. core-ci voted on patch set 6 V +1 12/01/22, 15:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34505

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

  13. Oli Bartsch uploaded patch set 7 V +1 12/01/22, 15:35

  14. Oli Bartsch commented on patch set 7 12/01/22, 15:37

    IsFileSelectableEvent.php:31 Reply

    As discussed, we keep the method in the event for backwards compatibility. The values however are now fetched directly from the $file and the constructor argument is removed.
  15. core-ci voted on patch set 7 V +1 12/01/22, 15:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34509

  16. Andreas Kienast voted on patch set 7 V +1 CR +1 12/01/22, 16:04

  17. Andreas Wolf commented on patch set 7 CR +1 12/01/22, 16:06

    Code looks good so far, I'm just wondering if we should leave the image dimensions method as is if we agree that it's just for bw compat, but probably not the brightest idea.

    IsFileSelectableEvent.php:31 Reply

    Wouldn't it make sense to immediately deprecate the method then?
  18. Oli Bartsch uploaded patch set 8 CR +1 V +1 12/01/22, 16:26

  19. Oli Bartsch commented on patch set 8 12/01/22, 16:26

    Reply

    Removed it in the event.

    IsFileSelectableEvent.php:31 Reply

    Thought about it again. Just removed the method and documented it accordingly in the RST.
  20. core-ci voted on patch set 8 V +1 12/01/22, 16:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34517

  21. Andreas Kienast voted on patch set 8 V +1 CR +1 12/01/22, 16:36

  22. Benni Mack voted on patch set 8 V +1 CR +1 12/01/22, 21:25

  23. Oli Bartsch voted on patch set 8 CR +2 12/01/22, 22:32

  24. Oli Bartsch voted on patch set 8 V +2 12/01/22, 22:33

  25. Oli Bartsch merged patch set 9 12/01/22, 22:33