Review main Merged

91405[TASK] Allow types for sys_redirect table

Jochen Roth CR +2 V +2 Hard +283 −78 updated 11/10/25, 15:55

Commit message

Currently, the sys_redirect table does not
support using multiple types in TCA.

This has been fixed by extending the TCA with
the "redirect_type" columns and adding the
field reference to the TCA. The filter / demand
is adapted to restrict the list of records to
the currently selected type.

Review

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

Issues 1

Files 24

Show 4 more files

Review log 3248

Show 1423 earlier messages
  1. Jochen Roth uploaded patch set 1 11/02/25, 20:30

  2. Jochen Roth updated the commit message in patch set 2 11/02/25, 20:31

  3. core-ci voted on patch set 1 V -1 11/02/25, 20:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88326

  4. core-ci voted on patch set 2 V -1 11/02/25, 20:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88327

  5. Jochen Roth uploaded patch set 3 V -1 11/02/25, 20:51

  6. Jochen Roth uploaded patch set 4 11/02/25, 20:55

  7. core-ci voted on patch set 3 V -1 11/02/25, 20:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88328

  8. core-ci voted on patch set 4 V +1 11/02/25, 21:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88329

  9. Oli Bartsch commented on patch set 4 11/02/25, 22:06

    sys_redirect.php:61

    'default' is '0' while sys_redirect defines '1' as only available type? 🤔
  10. Jochen Roth uploaded patch set 5 V +1 11/02/25, 23:11

  11. Jochen Roth uploaded patch set 6 11/02/25, 23:17

  12. core-ci voted on patch set 5 V -1 11/02/25, 23:18 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88330

  13. core-ci voted on patch set 6 V +1 11/02/25, 23:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88331

  14. Simon Schaufelberger commented on patch set 6 11/02/25, 23:33

    Demand.php:64

    can we make it an int?

    Demand.php:341

    no useless modifications please

    RedirectRepository.php:225

    types

    RedirectRepository.php:230

    since querybuilder is not reused, it can be inlined

    Modules.php:22

    reuse the constant from the DTO here?

    sys_redirect.php:39

    to be consistent, add a whitespace

    sys_redirect.php:61

    reuse the DTO constant here?

    sys_redirect.csv:3

    why is it a string here? would 1 not be enough?

    DemandTest.php:32

    why a string?
  15. Jochen Roth uploaded patch set 7 V +1 11/03/25, 18:28

  16. Jochen Roth uploaded patch set 8 11/03/25, 18:29

  17. Jochen Roth commented on patch set 8 11/03/25, 18:31

    sys_redirect.php:61 Reply

    Thanks, fixed it. :-)
  18. core-ci voted on patch set 7 V +1 11/03/25, 18:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88408

  19. core-ci voted on patch set 8 V +1 11/03/25, 18:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88409

  20. Simon Schaufelberger commented on patch set 8 11/03/25, 22:36

    Demand.php:341 Reply

    Done

    RedirectRepository.php:225 Reply

    Done

    sys_redirect.php:39 Reply

    Done
  21. Jochen Roth uploaded patch set 9 V +1 11/08/25, 09:39

  22. Jochen Roth uploaded patch set 10 11/08/25, 09:44

  23. core-ci voted on patch set 9 V -1 11/08/25, 09:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88687

  1. core-ci voted on patch set 10 V +1 11/08/25, 09:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88688

  2. Jochen Roth uploaded patch set 11 V +1 11/08/25, 09:58

  3. core-ci voted on patch set 11 V +1 11/08/25, 10:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88689

  4. Oli Bartsch uploaded patch set 12 V +1 11/09/25, 16:57

  5. core-ci voted on patch set 12 V -1 11/09/25, 17:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88746

  6. Oli Bartsch uploaded patch set 13 V -1 11/09/25, 17:05

  7. Oli Bartsch commented on patch set 13 CR +1 V +1 11/09/25, 17:07

    Demand.php:64

    ```suggestion string $redirectType = self::DEFAULT_REDIRECT_TYPE, ```

    RedirectRepository.php:230 Reply

    Done

    Modules.php:22 Reply

    Done

    sys_redirect.php:61 Reply

    Done
  8. core-ci voted on patch set 13 V +1 11/09/25, 17:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88747

  9. Garvin Hicking commented on patch set 13 11/10/25, 13:13

    sys_redirect.php:35

    Talked to Oli about this - maybe we should keep "1" here to not unneccessarily break instances extending the "1" type specifically (instead of "addToAllTypes"). Otherwise, a migration for this could be added too.
  10. Garvin Hicking commented on patch set 13 11/10/25, 13:13

    sys_redirect.php:35 Reply

    ("1" as a string, even though looking bad, would technically still work with the varchar column)
  11. Garvin Hicking voted on patch set 13 V +1 11/10/25, 13:17

  12. Oli Bartsch uploaded patch set 14 CR +1 V +1 11/10/25, 13:43

  13. Oli Bartsch commented on patch set 14 11/10/25, 13:43

    sys_redirect.php:35 Reply

    Done
  14. core-ci voted on patch set 14 V +1 11/10/25, 13:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88852

  15. Oli Bartsch voted on patch set 14 CR +1 V +1 11/10/25, 13:52

  16. Benni Mack commented on patch set 14 11/10/25, 15:20

    TcaMigration.php:1847

    should we merge showitem values?

    sys_redirect.php:35

    I personally don't like using constants in TCA (but that's a personal taste) and we tried to avoid this in most places (except PageRepository), mainly because one needs to load the class (PHP class loader) for the string. In addition, I think we're currently mis-using the "Demand" object (which is there for the search in the backend, not even public API), and I'd rather go with "default"
  17. Oli Bartsch uploaded patch set 15 CR +1 V +1 11/10/25, 15:33

  18. Oli Bartsch commented on patch set 15 11/10/25, 15:34

    TcaMigration.php:1847 Reply

    Not necessary. Override is the correct strategy here as it supports both usages `.=` and `=`.

    sys_redirect.php:35 Reply

    Done
  19. core-ci voted on patch set 15 V -1 11/10/25, 15:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88869

  20. Benni Mack commented on patch set 15 11/10/25, 15:44

    Demand.php:64 Reply

    this falls back to "default" now.

    sys_redirect.csv:3 Reply

    "default" is now used, better than magic numbers.

    DemandTest.php:32 Reply

    this falls back to "default" now.
  21. Oli Bartsch uploaded patch set 16 V -1 11/10/25, 15:46

  22. Oli Bartsch voted on patch set 16 CR +1 V +1 11/10/25, 15:46

  23. core-ci voted on patch set 16 V +1 11/10/25, 15:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88872

  24. Benni Mack voted on patch set 16 CR +2 V +2 11/10/25, 15:55

  25. Benni Mack merged patch set 17 11/10/25, 15:55