Review main Merged

70590[FEATURE] Use LinkResult to generated Typolinks in Frontend

Tomek Woldański CR +2 V +2 Hard +675 −64 updated 04/19/22, 11:38

Commit message

This change introduces a new immutable object "LinkResult" along
with an interface, containing the base result of a generated
link by TypoLink.

This object contains all information needed to put
together a <a> tag or return a pure URL.

For the time being this new class is used to build
links from the typolink link builders, and in addition
should be able to be returned fully by typolink
in the future.

In addition, this object helps to build links needed
for e.g. JSON responses to contain all information
of the link to be serialized.

Review

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

Issues 1

Files 15

Review log 2539

Show 914 earlier messages
  1. Tomek Woldański uploaded patch set 1 08/14/21, 10:50

  2. core-ci voted on patch set 1 V -1 08/14/21, 10:54 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15055

  3. Tomek Woldański uploaded patch set 2 08/14/21, 11:10

  4. core-ci voted on patch set 2 V -1 08/14/21, 11:30 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15056

  5. Tomek Woldański uploaded patch set 3 08/14/21, 11:32

  6. Tymoteusz Motylewski commented on patch set 3 CR -1 08/14/21, 11:39

    Unresolved

    [FEATURE], capital Add
  7. Tymoteusz Motylewski commented on patch set 3 08/14/21, 11:39

    Unresolved

    this is a feature so master only
  8. Tymoteusz Motylewski commented on patch set 3 08/14/21, 11:45

    ContentObjectRenderer.php:4828 Unresolved

    wouldnt 'linkData' be a better name here? what do you think?
  9. core-ci voted on patch set 3 V +1 08/14/21, 11:56 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15065

  10. Tomek Woldański uploaded patch set 4 08/23/21, 15:41

  11. core-ci voted on patch set 4 V -1 08/23/21, 16:02 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15417

  12. Tomek Woldański rebased onto patch set 5 08/24/21, 12:27

  13. core-ci voted on patch set 5 V +1 08/24/21, 12:42 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15503

  14. Benni Mack uploaded patch set 6 09/01/21, 12:52

  1. core-ci voted on patch set 6 V -1 09/01/21, 14:56 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16009

  2. Tomek Woldański uploaded patch set 7 09/02/21, 15:13

  3. core-ci voted on patch set 7 V -1 09/02/21, 15:24 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16103

  4. Tomek Woldański uploaded patch set 8 09/02/21, 15:25

  5. core-ci voted on patch set 8 V -1 09/02/21, 15:43 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16104

  6. Benni Mack uploaded patch set 9 09/02/21, 17:18

  7. Benni Mack uploaded patch set 10 09/02/21, 17:25

  8. Nikita Hovratov commented on patch set 8 CR -1 09/02/21, 17:26

    This feature is breaking. The LinkBuilders all of a sudden return now an object. They are considered public API, so we need a deprecation strategy for them. Maybe by extending ArrayAccess: https://www.php.net/manual/en/class.arrayaccess.php Such an access should then trigger a deprecation error. To further improve the API we can also add a factory/registry class for LinkBuilders and register them via DI. This would be a very similar treatment like with softrefs parsers recently: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70177
  9. core-ci voted on patch set 9 V -1 09/02/21, 17:35 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16117

  10. Benni Mack commented on patch set 10 09/02/21, 17:38

    Reply

    good point. ArrayAccess indeed seems like a good solution. I'm waiting for the next test run, and then implement ArrayAccess.
  11. core-ci voted on patch set 10 V -1 09/02/21, 17:42 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16119

  12. Benni Mack uploaded patch set 11 09/02/21, 18:00

  13. core-ci voted on patch set 11 V -1 09/02/21, 18:15 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16121

  14. Benni Mack uploaded patch set 12 09/02/21, 18:19

  15. core-ci voted on patch set 12 V +1 09/02/21, 18:33 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16122

  16. Benni Mack commented on patch set 13 09/02/21, 18:42

    Published edit on patch set 12.
  17. core-ci voted on patch set 13 V +1 09/02/21, 18:55 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16123

  18. Oliver Hader uploaded patch set 14 09/02/21, 20:17

  19. core-ci voted on patch set 14 V +1 09/02/21, 20:35 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16130

  20. Benni Mack voted on patch set 14 V +1 CR +1 09/02/21, 20:46

  21. Oliver Hader voted on patch set 14 V +2 CR +2 09/02/21, 20:58

  22. Oliver Hader merged patch set 15 09/02/21, 20:59

  23. Nikita Hovratov commented on patch set 15 09/03/21, 07:39

    Reply

    Done
  24. Oliver Hader commented on patch set 15 04/19/22, 11:36

    Hi folks, concerning https://review.typo3.org/c/Packages/TYPO3.CMS/+/72999 I stumbled over this change again. What's the reason again we introduced `typolink.returnLast = result` back then? Would it be possible to use (an intermediate) `public function typolinkResult(...): ?LinkResultInterface` instead?
  25. Oliver Hader commented on patch set 15 04/19/22, 11:38