Review main Abandoned

81441[FEATURE] Add PSR-14 event to adjust CLI `cleanup:flexforms`

Garvin Hicking CR 0 V 0 Hard +494 −3 updated 08/21/24, 18:58

Commit message

This patch adds a new PSR-14 event
`\TYPO3\CMS\Lowlevel\Event\ModifyRecordAfterFlexFormCleanupCommandEvent`
that can be used to modify the results of the CLI task
`bin/typo3 cleanup:flexforms`.

XML data can be adjusted, or persisting of the changes can
be prevented, effectively allowing developers to add
restrictions on what the cleanup task should affect.

This allows to restore possibly restrictions that previously
were possible with the `-depth` option of the cleanup command.

Review

  • Code review CR 0
  • Verified V 0

Issues 2

Files 6

Review log 1826

Show 1 earlier messages
  1. Garvin Hicking uploaded patch set 1 10/17/23, 09:17

  1. Garvin Hicking uploaded patch set 2 10/17/23, 09:18

  2. Christian Kuhn rebased onto patch set 3 10/17/23, 14:26

  3. core-ci voted on patch set 3 V -1 10/17/23, 14:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47873

  4. Garvin Hicking uploaded patch set 4 V -1 10/20/23, 11:46

  5. core-ci voted on patch set 4 V -1 10/20/23, 12:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47969

  6. Chris Müller uploaded patch set 5 V -1 10/20/23, 18:51

  7. Chris Müller commented on patch set 5 10/20/23, 18:53

    Feature-102184-PSR-14EventForFlexformCleanupCommand.rst:68

    Although this is a WIP: I would like to see that constructor injection is used for FlexFormTools instead of using GU (also with an example on how to use it in this case).
  8. core-ci voted on patch set 5 V -1 10/20/23, 19:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47992

  9. Garvin Hicking commented on patch set 5 10/20/23, 21:53

    Feature-102184-PSR-14EventForFlexformCleanupCommand.rst:68 Reply

    Thanks for your comment! Yes, this WIP is still very rough. I already removed the flexform dependency in the test, it will not be needed. xml2array seems to be sufficient. Still ironing this out :-)
  10. Garvin Hicking uploaded patch set 6 V -1 10/25/23, 14:18

  11. core-ci voted on patch set 6 V -1 10/25/23, 14:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48172

  12. Stefan Bürk commented on patch set 6 10/26/23, 21:44

    Feature-102184-PSR-14EventForFlexformCleanupCommand.rst:66

    Even in a example, please add the strict check true (3rd) argument for in_array() usages to emphasize that we intentionally do a strict type check here. And it's a good thing to have that in example codes which may be copy&pasted. I know - still WIP. But had a peek how the work is going ;)
  13. Benni Mack commented on patch set 6 08/06/24, 15:37

    please rebase and let's continue with this one
  14. Garvin Hicking commented on patch set 6 08/06/24, 15:46

    Reply

    Yep, it's on my list to finish before feature freeze (not sure I find the time in the next 2 vacation weeks; if anyone else wants to take on it, I'm not blocking)
  15. Garvin Hicking uploaded patch set 7 V -1 08/07/24, 09:36

    Rebase restructure rework
  16. core-ci voted on patch set 7 V -1 08/07/24, 09:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62992

  17. Garvin Hicking uploaded patch set 8 V -1 08/08/24, 09:24

    Add examples and tests
  18. core-ci voted on patch set 8 V +1 08/08/24, 09:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63035

  19. Garvin Hicking uploaded patch set 9 V +1 08/08/24, 09:30

    Add accidentally removed comment again
  20. core-ci voted on patch set 9 V -1 08/08/24, 09:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63036

  21. core-ci voted on patch set 9 V +1 08/08/24, 09:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63036

  22. Garvin Hicking commented on patch set 9 08/08/24, 09:52

    Patch ready for review

    Feature-102184-PSR-14EventForFlexformCleanupCommand.rst:66 Reply

    Done

    Feature-102184-PSR-14EventForFlexformCleanupCommand.rst:68 Reply

    Done
  23. Guido Schmechel voted on patch set 9 CR +1 08/18/24, 12:08

  24. Christian Kuhn commented on patch set 9 CR -1 08/21/24, 18:58

    there are various issues with this: first, there is actually little reason to suppress updating db-integrity changes for certain things. second, the 'getCleanXml()' is an event that is like a 'poor man' upgrade wizard. third, the event could in general be substituted by a custom command. overall, anja, garvin and me came to the conclusion we should not apply this patch at all.
  25. Garvin Hicking abandoned the change 08/21/24, 18:58

    See above. All good :)