Review main Merged

76464[BUGFIX] Ensure best matching URL is used during site resolving

Oliver Hader CR +2 V +2 Hard +330 −45 updated 11/08/22, 21:21

Commit message

Symfony's UrlMatcher takes multiple routes and returns the first
match. However there might be better matches that are not considered
at all. That's why a custom BestUrlMatcher is introduce, which
resolves all matches for further reduction.

Previously the route collection was sorted by names and identifiers,
which now has been adjusted to focus on the actual matches when being
compared to the current request. The fallback route (site base URI).
This way, overlapping route definitions can be resolved better.

Review

  • Code review CR +2 Done
    • Oliver Hader +2
    • Susi Moog +1
    • Benni Mack +1
  • Verified V +2 Done
    • Oliver Hader +2
    • Susi Moog +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 2633

Show 48 earlier messages
  1. Oliver Hader uploaded patch set 1 11/07/22, 22:48

  2. core-ci voted on patch set 1 V -1 11/07/22, 22:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33267

  3. Oliver Hader uploaded patch set 2 11/08/22, 13:36

  4. core-ci voted on patch set 2 V -1 11/08/22, 13:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33313

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

  6. Oliver Hader uploaded patch set 3 11/08/22, 14:41

  7. Oliver Hader commented on patch set 3 11/08/22, 14:41

    This change is ready for review.
  8. core-ci voted on patch set 3 V +1 11/08/22, 14:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33319

  1. Oliver Hader marked it work in progress 11/08/22, 14:52

  2. Oliver Hader uploaded patch set 4 11/08/22, 17:54

  3. core-ci voted on patch set 4 V -1 11/08/22, 18:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33331

  4. Oliver Hader uploaded patch set 5 11/08/22, 18:31

  5. core-ci voted on patch set 5 V +1 11/08/22, 18:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33340

  6. Oliver Hader commented on patch set 5 11/08/22, 18:48

    This change is ready for review.
  7. Susi Moog voted on patch set 5 V +1 CR +1 11/08/22, 19:32

  8. Benni Mack commented on patch set 5 11/08/22, 19:58

    BestUrlMatcher.php:57

    no yoda style please
  9. Benni Mack commented on patch set 5 CR -2 11/08/22, 19:58

    this can't go in until my comments are fixed!!!!
  10. Benni Mack voted on patch set 5 CR 0 11/08/22, 19:59

  11. Benni Mack commented on patch set 5 11/08/22, 20:01

    SiteMatcherTest.php:112

    comment is wrong now, I guess
  12. Benni Mack commented on patch set 5 CR -2 11/08/22, 20:01

    I do have to re-add my veto here.
  13. Benni Mack voted on patch set 5 CR 0 11/08/22, 20:02

  14. Oliver Hader marked it work in progress 11/08/22, 20:02

  15. Oliver Hader commented on patch set 5 11/08/22, 20:02

    Will check tomorrow
  16. Benni Mack uploaded patch set 6 11/08/22, 21:08

  17. Benni Mack marked it ready for review 11/08/22, 21:09

  18. Benni Mack voted on patch set 6 V +1 CR +1 11/08/22, 21:09

  19. Benni Mack commented on patch set 6 11/08/22, 21:10

    Looks good from my side now.
  20. Susi Moog voted on patch set 6 V +1 CR +1 11/08/22, 21:15

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

  22. Oliver Hader commented on patch set 6 11/08/22, 21:19

    BestUrlMatcher.php:57 Reply

    Done

    SiteMatcherTest.php:112 Reply

    Done
  23. Oliver Hader commented on patch set 6 11/08/22, 21:20

    SiteMatcherTest.php:112

    it's the fallback route (having the same option) - which is kind of "random"
  24. Oliver Hader voted on patch set 6 V +2 CR +2 11/08/22, 21:21

  25. Oliver Hader merged patch set 7 11/08/22, 21:21