Review main Merged

74374[FEATURE] Move LinkResultFactory functionality into LinkFactory

Benni Mack CR +2 V +2 Normal +138 −76 updated 10/20/22, 14:18

Commit message

The newly introduced LinkFactory is the main entrypoint
for generating links. It can now be used to generate URLs,
also in TYPO3 Backend (such as for sys_news RTE fields).

The LinkResultFactory functionality has now been merged
into LinkFactory, making LinkFactory the de-facto standard
for generating links.

A Feature RST is added to explain the new functionality.

A class alias as well as an alias in the service configuration
is added to have LinkResultFactory still working in TYPO3 v12.

Review

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

Issues 1

Files 10

Review log 3146

Show 1321 earlier messages
  1. Benni Mack uploaded patch set 1 04/22/22, 20:22

  2. core-ci voted on patch set 1 V -1 04/22/22, 20:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26323

  3. Benni Mack uploaded patch set 2 05/02/22, 14:25

  4. core-ci voted on patch set 2 V -1 05/02/22, 14:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26733

  5. Benni Mack uploaded patch set 3 05/02/22, 14:43

  6. core-ci voted on patch set 3 V -1 05/02/22, 14:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26736

  7. core-ci voted on patch set 3 V +1 05/02/22, 15:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26736

  8. Benni Mack uploaded patch set 4 05/02/22, 20:39

  9. core-ci voted on patch set 4 V -1 05/02/22, 20:50 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26750

  10. Oli Bartsch commented on patch set 4 05/02/22, 21:02

    Deprecation-97536-LinkResultFactory.rst:3

    what is this for?

    Deprecation-97536-LinkResultFactory.rst:41

    Should we repeat the migration from `createUriFromString()` to `createUri()` here or even move this from the "description" section?

    Feature-97536-UnifiedAPIForGeneratingTypolinks.rst:31

    Should we really mention the @internal JsonLinkResult class here?

    LinkFactory.php:114

    Let's add extension scanner coverage for this method.

    LinkResult.php:136

    Should we document those removals somehow?

    LinkResultFactory.php:27

    Let's add extension scanner coverage for this class.

    LinkResultFactory.php:27

    Let's add extension scanner coverage for this class.
  11. Oliver Hader commented on patch set 4 05/04/22, 06:13

    I've collected some examples on LinkResult at https://notes.typo3.org/bIfAqSp7Rp-utOOP4K2NVw?view The main aspect is, that at the time of creating a LinkResult the actual usage is not known yet (e.g. as JsonLinkResult or HtmlLinkResult). Thus, I'd opt for combining the context-specific representation on just one object (or corresponding capabilities, which would be reflected by a json-interface or html-interface).
  12. Benni Mack uploaded patch set 5 09/22/22, 23:04

  13. core-ci voted on patch set 5 V -1 09/22/22, 23:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31466

  14. Simon Schaufelberger commented on patch set 5 09/22/22, 23:53

    Deprecation-97536-LinkResultFactory.rst:3 Reply

    afaik it's a unique identifier for this file for reference links
  15. Andreas Kienast commented on patch set 5 09/23/22, 06:39

    Deprecation-97536-LinkResultFactory.rst:3 Reply

    That's exactly what Simon described.
  16. Oliver Hader uploaded patch set 6 10/17/22, 14:09

  17. Oliver Hader commented on patch set 6 10/17/22, 14:12

    I used an alternative approach now via `LinkResultSerializer`... the only guarantee (contract) we have is the interface, not any of the specific implementations. Basically `HtmlLinkResult` becomes superfluous, the only relevant part there is the serialization, but not the model and its payload.
  18. Oliver Hader commented on patch set 6 10/17/22, 14:13

    Reply

    All other RST and comments need to be adjusted of course... in case of disagreement with this approach, go ahead and revert back to patch-set 5.
  19. core-ci voted on patch set 6 V -1 10/17/22, 14:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32394

  20. Oliver Hader uploaded patch set 7 10/17/22, 15:07

  21. core-ci voted on patch set 7 V -1 10/17/22, 15:18 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32396

  1. Oliver Hader uploaded patch set 8 10/17/22, 15:19

  2. Oliver Hader uploaded patch set 9 10/17/22, 15:27

  3. core-ci voted on patch set 8 V -1 10/17/22, 15:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32397

  4. core-ci voted on patch set 9 V -1 10/17/22, 15:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32399

  5. Oliver Hader uploaded patch set 10 10/17/22, 16:58

  6. core-ci voted on patch set 10 V +1 10/17/22, 17:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32402

  7. Benni Mack commented on patch set 10 10/19/22, 08:54

    LinkResult.php:136 Reply

    it's not removed, it's moved (to the top)
  8. Benni Mack uploaded patch set 11 10/19/22, 09:03

  9. core-ci voted on patch set 11 V +1 10/19/22, 09:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32462

  10. Oliver Hader rebased onto patch set 12 10/19/22, 10:10

  11. Oliver Hader commented on patch set 12 10/19/22, 10:10

    This change is ready for review.
  12. Oliver Hader commented on patch set 12 10/19/22, 10:14

    Extension Scanner declarations for old `LinkResultFactory` would be a good thing...
  13. core-ci voted on patch set 12 V +1 10/19/22, 10:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32463

  14. Benni Mack commented on patch set 12 CR -1 10/19/22, 10:20

    Extension Scanner missing.
  15. Benni Mack uploaded patch set 13 10/20/22, 09:03

  16. Benni Mack commented on patch set 13 10/20/22, 09:03

    Feature-97536-UnifiedAPIForGeneratingTypolinks.rst:31 Reply

    Done

    LinkFactory.php:114 Reply

    Done

    LinkResultFactory.php:27 Reply

    Done

    LinkResultFactory.php:27 Reply

    Done
  17. core-ci voted on patch set 13 V +1 10/20/22, 09:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32499

  18. Simon Schaufelberger wrote 10/20/22, 10:26

    Removed cc Simon Schaufelberger.
  19. Oli Bartsch commented on patch set 13 CR -1 10/20/22, 13:15

    Currently on it
  20. Oli Bartsch uploaded patch set 14 10/20/22, 14:03

  21. Oli Bartsch commented on patch set 14 V +1 CR +1 10/20/22, 14:03

    Deprecation-97536-LinkResultFactory.rst:41 Reply

    Done
  22. core-ci voted on patch set 14 V +1 10/20/22, 14:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32515

  23. Oliver Hader voted on patch set 14 CR +1 10/20/22, 14:16

  24. Oliver Hader voted on patch set 14 V +2 CR +2 10/20/22, 14:18

  25. Oliver Hader merged patch set 15 10/20/22, 14:18