Review main Merged Breaking

90555[!!!][FEATURE] Add PSR-14 Event before form deletion

Josua Vogel CR +2 V +2 Hard +247 −27 updated 09/11/25, 14:23

Commit message

A new PSR-14 event TYPO3\CMS\Form\Event\BeforeFormIsDeletedEvent
is introduced. It serves as a direct replacement for the now
removed hook $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/form']
['beforeFormDelete'].

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Garvin Hicking +1
    • Mogens Fiebrandt +1
    • Josua Vogel +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Garvin Hicking +1
    • Josua Vogel +1
    • core-ci +1 CI

Issues 1

Files 7

Review log 2330

Show 45 earlier messages
  1. Josua Vogel uploaded patch set 1 09/03/25, 12:32

  2. Josua Vogel commented on patch set 1 09/03/25, 12:34

    open: Should we provide an option to prevent deletion?
  3. core-ci voted on patch set 1 V +1 09/03/25, 12:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84320

  4. Mogens Fiebrandt commented on patch set 1 CR -1 09/05/25, 21:21

    Feature-107382-IntroducePSR14BeforeFormIsDeletedEvent.rst:51

    I think here is a small copy-paste error. Should say something like "... it's now possible to execute custom code/script before a form is deleted".
  5. Josua Vogel uploaded patch set 2 CR -1 V +1 09/07/25, 10:20

  1. Josua Vogel commented on patch set 2 09/07/25, 10:25

    Feature-107382-IntroducePSR14BeforeFormIsDeletedEvent.rst:51 Reply

    Done
  2. core-ci voted on patch set 2 V +1 09/07/25, 10:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84567

  3. Simon Schaufelberger commented on patch set 2 09/07/25, 11:18

    Reply

    I guess that would make sense as I don't know what could be a useful usecase what to do just with the identifier.
  4. Josua Vogel uploaded patch set 3 V +1 09/08/25, 06:07

  5. Josua Vogel uploaded patch set 4 09/08/25, 06:10

  6. core-ci voted on patch set 3 V -1 09/08/25, 06:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84599

  7. core-ci voted on patch set 4 V -1 09/08/25, 06:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84600

  8. Josua Vogel uploaded patch set 5 V -1 09/08/25, 06:45

  9. Josua Vogel commented on patch set 5 09/08/25, 06:47

    Reply

    Done
  10. core-ci voted on patch set 5 V +1 09/08/25, 06:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84603

  11. Simon Schaufelberger voted on patch set 5 CR +1 V +1 09/08/25, 08:14

  12. Oli Bartsch commented on patch set 5 09/09/25, 09:01

    Feature-107382-IntroducePSR14BeforeFormIsDeletedEvent.rst:22

    `$preventDeletion` is not readonly.

    Feature-107382-IntroducePSR14BeforeFormIsDeletedEvent.rst:54

    And to add custom logic based on the delete action.

    BeforeFormIsDeletedEvent.php:21

    Actually the benefit is: Getting the identifier, are able to stop deletion and add custom login e.g. cleanup etc.

    BeforeFormIsDeletedEvent.php:24

    I suggest to make the event stoppable, based on `$preventDeletion`. So whenever this is set to `true`, no further listener is called.

    FormManagerControllerTest.php:533

    Please use: $this->importCSVDataSet(__DIR__ . '/../Fixtures/be_users.csv'); $this->setUpBackendUser(1); instead.

    ArrayDimensionMatcher.php:1216

    We usually always add new entries at the bottom to make resolving merge conflicts easier.
  13. Oli Bartsch commented on patch set 5 09/09/25, 09:21

    FormManagerControllerTest.php:533 Reply

    Should also be updated in `beforeFormIsCreatedEventIsTriggered` as drive-by.
  14. Simon Schaufelberger voted on patch set 5 CR 0 V 0 09/09/25, 09:46

  15. Josua Vogel uploaded patch set 6 V +1 09/09/25, 14:09

  16. Josua Vogel commented on patch set 6 09/09/25, 14:10

    Feature-107382-IntroducePSR14BeforeFormIsDeletedEvent.rst:22 Reply

    Done

    Feature-107382-IntroducePSR14BeforeFormIsDeletedEvent.rst:54 Reply

    Done

    BeforeFormIsDeletedEvent.php:21 Reply

    Done

    BeforeFormIsDeletedEvent.php:24 Reply

    Done

    FormManagerControllerTest.php:533 Reply

    Done

    ArrayDimensionMatcher.php:1216 Reply

    Done
  17. core-ci voted on patch set 6 V -1 09/09/25, 14:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84711

  18. Oli Bartsch uploaded patch set 7 V -1 09/09/25, 14:33

  19. core-ci voted on patch set 7 V +1 09/09/25, 14:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84714

  20. Josua Vogel voted on patch set 7 CR +1 V +1 09/09/25, 14:43

  21. Oli Bartsch voted on patch set 7 CR +1 V +1 09/09/25, 14:54

  22. Garvin Hicking voted on patch set 7 CR +1 V +1 09/09/25, 16:10

  23. Oli Bartsch voted on patch set 7 CR +2 V +2 09/09/25, 17:36

  24. Oli Bartsch merged patch set 8 09/09/25, 17:36

  25. Mogens Fiebrandt voted on patch set 8 CR +1 09/11/25, 14:23