Review main Merged

61050[TASK] Move Slug Candidate functionality into its own class

Benni Mack CR +2 V +2 Hard +314 −222 updated 07/17/19, 18:15

Commit message

When Page-based slug handling + routing was introduced,
the initial PageRouter class turned big very quickly.

Especially managing the possible pages that could match
was initially based on the candidates principle that could
be moved / exchanged later-on.

For this to happen the initial step is to move this to a separate
PHP class called "PageSlugCandidateProvider".

As seen in the patch, all calls to the database related
to retrieving pages (DB + PageRepository) are
moved into PageSlugCandidateProvider.

Review

  • Code review CR +2 Done
    • Andreas Kienast +2
    • Georg Ringer +1
  • Verified V +2 Done
    • Andreas Kienast +2
    • Georg Ringer +1
    • TYPO3com +1 CI

Issues 1

Files 3

Review log 2128

Show 23 earlier messages
  1. Benni Mack uploaded patch set 1 06/17/19, 11:23

  2. TYPO3com voted on patch set 1 V +1 06/17/19, 11:36 Completed build in 12m 54s on Mon, 17 Jun, 01:36 PM Test Summary: 46480 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-34381

  3. Benni Mack uploaded patch set 2 06/17/19, 14:34

  1. TYPO3com voted on patch set 2 V +1 06/17/19, 14:48 Completed build in 13m 45s on Mon, 17 Jun, 04:48 PM Test Summary: 46446 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-34392

  2. Daniel Goerz commented on patch set 2 06/27/19, 14:56

    Maybe better name the class PageCandidateProvider and the getter methods getPageCandidateProvider? Because the Provider class finds page candidates and not slug candidates. Additionally one API does not care about slugs at all (getCandidateForPageId) and the other one cares for paths (getCandidatesForPath).

    PageSlugCandidateProvider.php:103 Unresolved

    does not interact with the slug field at all
  3. Benni Mack commented on patch set 2 06/27/19, 19:41

    Now that I think of it, we might be able to shift it to PageRepository completely IMHO.
  4. Daniel Goerz commented on patch set 2 06/28/19, 10:19

    > Patch Set 2: > > Now that I think of it, we might be able to shift it to PageRepository completely IMHO. Sure, makes sense as well
  5. Benni Mack commented on patch set 2 06/28/19, 13:52

    > Patch Set 2: > > > Patch Set 2: > > > > Now that I think of it, we might be able to shift it to PageRepository completely IMHO. > > Sure, makes sense as well Hmm, not really. The method you mentioned is really strange, and i try to wrap my head around of why I did it like this 11 months ago... phew.
  6. Benni Mack uploaded patch set 3 06/28/19, 13:55

  7. TYPO3com voted on patch set 3 V -1 06/28/19, 14:03 Completed build in 08m 07s on Fri, 28 Jun, 04:03 PM Test Summary: 3674 of 47185 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-34613

  8. Andreas Kienast commented on patch set 3 CR -1 06/28/19, 14:06

    PageRouter.php:123 Unresolved

    Undefined variable $page, the whole line should be probably $pageId?

    PageSlugCandidateProvider.php:153

    micro opt: static function
  9. Benni Mack commented on patch set 3 06/28/19, 14:07

    PageSlugCandidateProvider.php:153 Reply

    I'd just like to move the logic, in order to minimize impact, if that's OK.
  10. Andreas Kienast commented on patch set 3 06/28/19, 14:08

    PageSlugCandidateProvider.php:153 Reply

    Sure!
  11. Benni Mack uploaded patch set 4 06/28/19, 14:08

  12. Andreas Kienast commented on patch set 4 06/28/19, 14:18

    PageRouter.php:228

    phpDoc says "query parameters", how can this be an object? Do we miss some special handling?
  13. TYPO3com voted on patch set 4 V +1 06/28/19, 14:19 Completed build in 10m 20s on Fri, 28 Jun, 04:19 PM Test Summary: 46826 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-34614

  14. Benni Mack uploaded patch set 5 07/17/19, 05:27

  15. Benni Mack uploaded patch set 6 07/17/19, 05:33

  16. TYPO3com voted on patch set 5 V +1 07/17/19, 05:39 Completed build in 11m 56s on Wed, 17 Jul, 07:39 AM Test Summary: 47122 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-35113

  17. TYPO3com voted on patch set 6 V +1 07/17/19, 05:44 Completed build in 11m 14s on Wed, 17 Jul, 07:44 AM Test Summary: 47120 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-35114

  18. Benni Mack commented on patch set 6 07/17/19, 05:45

    PageRouter.php:228 Reply

    yes. I removed that one again. sry
  19. Andreas Kienast voted on patch set 6 V +1 CR +1 07/17/19, 06:28

  20. Oliver Klee commented on patch set 6 07/17/19, 09:34

    PageSlugCandidateProvider.php:68 Unresolved

    string[]

    PageSlugCandidateProvider.php:187 Unresolved

    Can we make the return type annotation more specific?

    PageSlugCandidateProvider.php:251 Unresolved

    Ditto.
  21. Benni Mack uploaded patch set 7 07/17/19, 15:17

  22. TYPO3com voted on patch set 7 V +1 07/17/19, 15:33 Completed build in 16m 31s on Wed, 17 Jul, 05:33 PM Test Summary: 47120 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-35133

  23. Georg Ringer voted on patch set 7 V +1 CR +1 07/17/19, 18:04

  24. Andreas Kienast voted on patch set 7 V +2 CR +2 07/17/19, 18:15

  25. Andreas Kienast merged patch set 8 07/17/19, 18:15