Review main Merged

58101[TASK] Streamline page language linking

Oliver Hader CR +2 V +2 Normal +67 −10 updated 08/31/18, 11:53

Commit message

When having a Site configuration in order to create a page link for
a specific language new property `language` has to be used instead
of previous `additionalParams=&L=1`. Since it might not be known in
all cases whether the defined TypoScript is used inside or outside
a valid Site configuration, `language` settings now take precedence
and override legacy L-parameter.

Besides that, linking to localized pages was not possible and is
resolved to their language parent pages. The new `language` setting
will be adjusted at the same time as well.

Review

  • Code review CR +2
    • Frans Saris +2
    • Wouter Wolters +1
    • Benni Mack +1
  • Verified V +2
    • Frans Saris +2
    • Benni Mack +1
    • TYPO3com +1 CI

Issues 1

Files 2

Review log 1622

  1. Oliver Hader uploaded patch set 1 08/31/18, 10:00

  2. TYPO3com voted on patch set 1 V -1 08/31/18, 10:01 Completed build in 18s on Fri, 31 Aug, 12:01 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-27405

  3. Oliver Hader uploaded patch set 2 08/31/18, 10:08

  4. Benni Mack commented on patch set 2 08/31/18, 10:10

    PageLinkBuilder.php:256

    what is the return type here? always array? is that possible?
  5. TYPO3com voted on patch set 2 V -1 08/31/18, 10:20 Completed build in 12m 27s on Fri, 31 Aug, 12:20 PM Test Summary: 24 of 35524 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-27408

  6. Oliver Hader uploaded patch set 3 08/31/18, 10:20

  7. TYPO3com voted on patch set 3 V +1 08/31/18, 10:29 Completed build in 08m 12s on Fri, 31 Aug, 12:29 PM Test Summary: 35290 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-27410

  8. Frans Saris commented on patch set 3 CR -1 08/31/18, 10:32

    PageLinkBuilder.php:71

    what's the benefit of breaking this into 2 lines?

    PageLinkBuilder.php:261

    as we now getPage() always returns an array. I would go for `if ($page === []) { `

    PageLinkBuilder.php:267

    if `$page[$languageField]` doesn't exist doesn't this give an error then? $language = (int)($page[$languageField] ?? 0);

    PageLinkBuilder.php:361

    maybe mention in the commentthat you override the L param here in $additionalQueryParams
  9. Oliver Hader commented on patch set 3 08/31/18, 10:35

    PageLinkBuilder.php:71 Reply

    avoid notice

    PageLinkBuilder.php:261 Reply

    which is same as empty($page)

    PageLinkBuilder.php:267 Reply

    that's in contrary now to your first comment in this class

    PageLinkBuilder.php:361 Reply

    fine
  10. Oliver Hader uploaded patch set 4 08/31/18, 10:43

  11. TYPO3com voted on patch set 4 V +1 08/31/18, 10:52 Completed build in 08m 34s on Fri, 31 Aug, 12:52 PM Test Summary: 35290 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-27412

  12. Frans Saris commented on patch set 3 08/31/18, 11:04

    PageLinkBuilder.php:261 Reply

    but more strict and tells more about the return value. this method should always return an array. And empty() handles multiple values; null,0,empty string, etc So to make the core more readable and strict I would opt for the comparison with []
  13. Oliver Hader commented on patch set 5 08/31/18, 11:08

    Published edit on patch set 4.
  14. Frans Saris commented on patch set 5 CR +1 08/31/18, 11:12

    PageLinkBuilder.php:277

    same here
  15. Frans Saris updated the commit message in patch set 6 08/31/18, 11:13

  16. Frans Saris voted on patch set 6 CR +1 08/31/18, 11:13

  17. TYPO3com voted on patch set 5 V +1 08/31/18, 11:17 Completed build in 08m 52s on Fri, 31 Aug, 01:17 PM Test Summary: 35290 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-27413

  18. TYPO3com voted on patch set 6 V +1 08/31/18, 11:22 Completed build in 08m 52s on Fri, 31 Aug, 01:22 PM Test Summary: 35290 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-27414

  19. Benni Mack voted on patch set 6 V +1 CR +1 08/31/18, 11:33

  20. Wouter Wolters voted on patch set 6 CR +1 08/31/18, 11:35

  21. Frans Saris voted on patch set 6 V +2 CR +2 08/31/18, 11:53

  22. Frans Saris merged patch set 7 08/31/18, 11:53