Review main Merged

76816[TASK] Streamline ext:redirects auto-create chain

Stefan Bürk CR +2 V +2 Hard +587 −110 updated 12/05/22, 22:38

Commit message

Changing the slugs of pages automatically creates
redirects, if ext:redirects is installed and
that feature has not been disabled. Detecting and
handling this has been based on the `slug` value
from the page record.

There are some valid use cases which would benefit
from the one or other good placed event. Another
use case would be to create a redirect with a real
build source path, thus respecting configured site
route enhancers and decorators. Creating multiple
redirects based on different arguments and typeNum
may be another use case.

This change acts as a preparation for upcoming
features. Thus, it changes the passed through
dataset in a way to transport valuable data.
Handling and consuming methods have been adjusted.
Pointing out possible places for events are added,
which makes the need for the changes more obvious.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Nikita Hovratov +1
    • Benni Mack +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Nikita Hovratov +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 13

Review log 2741

Show 1016 earlier messages
  1. Stefan Bürk uploaded patch set 1 11/25/22, 05:55

  2. core-ci voted on patch set 1 V -1 11/25/22, 06:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34191

  3. Stefan Bürk uploaded patch set 2 V -1 11/25/22, 07:39

  4. core-ci voted on patch set 2 V +1 11/25/22, 07:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34194

  5. Stefan Bürk updated the commit message in patch set 3 V +1 11/25/22, 07:51

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

  7. Nikita Hovratov uploaded patch set 4 V +1 11/25/22, 12:14

  8. Nikita Hovratov uploaded patch set 5 11/25/22, 12:15

  9. Nikita Hovratov commented on patch set 5 11/25/22, 12:17

    SlugService.php:133

    Maybe we should encapsule the return value into a class, as it is used in various places. This way we could easily typehint parameters and we wouldn't need to create a docblock for phpstan everytime.
  10. core-ci voted on patch set 5 V +1 11/25/22, 12:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34211

  11. core-ci voted on patch set 4 V +1 11/25/22, 12:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34210

  12. Stefan Bürk commented on patch set 5 CR -1 11/25/22, 13:23

    DataHandlerSlugUpdateHook.php:36

    Mhh .. not really correct, as it is the full record, not only the slug anymore. Will come up with a push on weekend with the rest.

    SlugService.php:133 Reply

    Mh .. not sure. Will re-think it on the weekend. Anyway, thanks for the input.
  13. Stefan Bürk uploaded patch set 6 CR -1 V +1 11/26/22, 14:21

  14. Stefan Bürk commented on patch set 6 11/26/22, 14:22

    DataHandlerSlugUpdateHook.php:36 Reply

    Done

    SlugService.php:133 Reply

    This was a good point. Thanks for hinting on this. It's quite better with a class, and much more cleaner.
  15. core-ci voted on patch set 6 V +1 11/26/22, 14:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34259

  16. Nikita Hovratov voted on patch set 6 CR +1 11/26/22, 22:00

  1. Stefan Bürk uploaded patch set 7 CR +1 V +1 11/27/22, 21:03

  2. core-ci voted on patch set 7 V +1 11/27/22, 21:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34289

  3. Stefan Bürk uploaded patch set 8 V +1 11/27/22, 21:48

  4. Stefan Bürk uploaded patch set 9 11/27/22, 21:52

  5. core-ci voted on patch set 8 V +1 11/27/22, 21:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34290

  6. core-ci voted on patch set 9 V +1 11/27/22, 22:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34291

  7. Stefan Bürk uploaded patch set 10 V +1 11/27/22, 22:13

  8. core-ci voted on patch set 10 V +1 11/27/22, 22:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34292

  9. Benni Mack commented on patch set 10 11/28/22, 09:22

    ChangeItem.php:29

    I have the feeling we should rename this class - "RedirectChangeItem" or "PageRedirectChangeItem". It is related to Pages, Slugs, Redirects...
  10. Nikita Hovratov commented on patch set 10 11/29/22, 13:23

    PlainSlugReplacementSource.php:21

    what is combat?

    SourcesCollection.php:23

    Sorry, another naming thing: How about `SourceCollection`? Collection already implies plural.

    SourcesCollection.php:50

    Implement \Countable Interface?
  11. Benni Mack uploaded patch set 11 V +1 12/03/22, 21:18

  12. core-ci voted on patch set 11 V +1 12/03/22, 21:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34594

  13. Benni Mack commented on patch set 11 V +1 CR +1 12/03/22, 21:46

    ChangeItem.php:29 Reply

    Done

    PlainSlugReplacementSource.php:21 Reply

    Done

    SourcesCollection.php:23 Reply

    Done

    SourcesCollection.php:50 Reply

    Done
  14. Nikita Hovratov uploaded patch set 12 CR +1 V +1 12/05/22, 18:38

  15. Nikita Hovratov commented on patch set 12 12/05/22, 18:45

    SlugServiceTest.php:502

    We have this duplicate code now. Should we create a factory class for this?
  16. core-ci voted on patch set 12 V +1 12/05/22, 18:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34645

  17. Nikita Hovratov uploaded patch set 13 V +1 12/05/22, 19:03

  18. Nikita Hovratov commented on patch set 13 12/05/22, 19:04

    SlugServiceTest.php:502 Reply

    Done
  19. Nikita Hovratov uploaded patch set 14 12/05/22, 19:06

  20. core-ci voted on patch set 14 V +1 12/05/22, 19:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34647

  21. core-ci voted on patch set 13 V -1 12/05/22, 19:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34646

  22. Nikita Hovratov voted on patch set 14 V +1 CR +1 12/05/22, 19:24

  23. Benni Mack voted on patch set 14 V +1 CR +1 12/05/22, 22:37

  24. Stefan Bürk voted on patch set 14 V +2 CR +2 12/05/22, 22:38

  25. Stefan Bürk merged patch set 15 12/05/22, 22:38