Review main Merged

62420[TASK] Move Copyright information generation out of TYPO3 Backend

Benni Mack CR +2 V +2 Normal +200 −45 updated 12/05/19, 16:09

Commit message

The BackendUtility::getCopyRightNotice() is ugly, and can only be used
in Backend context (not install tool).

A new PHP class "Typo3Copyright" in EXT:core encapsulates this
information so it can be used in other places as well.

The old method is marked as deprecated.

Review

  • Code review CR +2 Done
    • Daniel Goerz +2
    • Susi Moog +1
  • Verified V +2 Done
    • Daniel Goerz +2
    • Susi Moog +1
    • TYPO3com +1 CI

Issues 1

Files 9

Review log 1622

  1. Benni Mack uploaded patch set 1 11/23/19, 15:15

  2. TYPO3com voted on patch set 1 V +1 11/23/19, 15:23 Completed build in 08m 02s on Sat, 23 Nov, 03:23 PM Test Summary: 48161 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38766

  3. Alexander Schnitzler commented on patch set 1 11/23/19, 15:42

    Typo3Copyright.php:1

    wow, this class has so many dependencies we currently do not or cannot handle via DI. TYPO3_copyright_year could be a parameter, handled by the service container. LanguageService should always be available via DI, right? $GLOBALS['TYPO3_CONF_VARS']['SYS']['loginCopyrightWarrantyProvider'] could be a parameter $GLOBALS['TYPO3_CONF_VARS']['SYS']['loginCopyrightWarrantyURL'] as well. I know we are not there yet but if we introduce new "services", shouldn't we start embracing our DI even more? And I also know that I raise dozens of questions here which don't need to be answered now but we need to answer them soon.
  4. Susi Moog uploaded patch set 2 11/23/19, 15:47

  5. Susi Moog commented on patch set 2 11/23/19, 15:48

    Typo3Copyright.php:1 Reply

    I did at least the last part - added DI to the Controllers.
  6. TYPO3com voted on patch set 2 V +1 11/23/19, 15:54 Completed build in 07m 21s on Sat, 23 Nov, 03:54 PM Test Summary: 48161 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38770

  7. Benni Mack commented on patch set 2 11/23/19, 15:59

    Typo3Copyright.php:1 Reply

    @Alex: I guess this is sarcasm? AFAIK Symfony 5.0 introduced that DI only works with objects, which is currently a block - and IMHO a really bad idea, but looks like we have to keep in sync with Symfony DI for now. so injecting properties is not as we wanted it to be. the properties should/could be injected. Maybe we should separate the class to hold information (similar to Environment API, but non-static of course) and another class taking care of the Rendering (having the LanguageService in place).
  8. Alexander Schnitzler commented on patch set 2 11/23/19, 17:08

    Typo3Copyright.php:1 Reply Unresolved

    Hmm, no, was neither a joke nor sarcasm. I would be very confused if they dropped the possibility to let the container handle parameters. https://symfony.com/doc/current/components/dependency_injection.html The docs still show examples with parameter. https://symfony.com/doc/4.1/service_container/parameters.html <- this is not updated, unfortunately.
  9. Georg Ringer commented on patch set 2 11/23/19, 19:27

    BackendUtility.php:3822 Unresolved

    : string but why don't we deprecate it right away?

    Typo3Copyright.php:71 Unresolved

    would like to see a hsc here, also below
  10. Benni Mack uploaded patch set 3 11/23/19, 20:58

  11. TYPO3com voted on patch set 3 V -1 11/23/19, 21:05 Completed build in 07m 25s on Sat, 23 Nov, 09:05 PM Test Summary: 47907 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38785

  12. TYPO3com voted on patch set 3 V +1 11/23/19, 22:30 Completed build in 1h 40m 00s on Sat, 23 Nov, 10:30 PM Test Summary: 48161 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38785

  13. Georg Ringer voted on patch set 3 V +1 CR +1 11/23/19, 23:02

  14. Daniel Goerz uploaded patch set 4 11/24/19, 18:10

  15. TYPO3com voted on patch set 4 V +1 11/24/19, 18:18 Completed build in 07m 32s on Sun, 24 Nov, 06:18 PM Test Summary: 48161 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38803

  16. Daniel Goerz voted on patch set 4 V +1 CR +1 11/24/19, 18:31

  17. Susi Moog uploaded patch set 5 11/25/19, 07:07

  18. TYPO3com voted on patch set 5 V +1 11/25/19, 07:38 Completed build in 08m 31s on Mon, 25 Nov, 07:38 AM Test Summary: 48161 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38809

  19. Susi Moog voted on patch set 5 V +1 CR +1 11/25/19, 08:01

  20. Daniel Goerz voted on patch set 5 V +2 CR +2 11/25/19, 08:19

  21. Daniel Goerz merged patch set 6 11/25/19, 08:19

  22. Mathias Brodala commented on patch set 6 12/05/19, 16:09

    There are still some places which should use this new API, I've added https://forge.typo3.org/issues/89866 for this.