Review main Merged

71888[TASK] Add extension title to meta data and use it

Helmut Hummel CR +2 V +2 Normal +40 −16 updated 10/21/21, 12:27

Commit message

Instead of reading the composer.json / ext_emconf.php
of extensions at runtime just to retrieve the extension title,
use the existing package meta data API to store and retrieve this
information.

With these changes in place, the workaround for title handling can be
removed and CLI extension list can also use the new API and show the
(shorter) title instead of the description.

In the long run, it should be evaluated, whether the UI
can be changed to be able to show longer descriptions, or
whether a short description (aka title) is important enough
to introduce a public configuration for it.

Review

  • Code review CR +2 Done
    • Helmut Hummel +2
    • Simon Gilli +1
    • Benni Mack +1
  • Verified V +2 Done
    • Helmut Hummel +2
    • Simon Gilli +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 6

Review log 2227

Show 2 earlier messages
  1. Helmut Hummel uploaded patch set 1 10/19/21, 14:59

  2. Helmut Hummel updated the commit message in patch set 2 10/19/21, 15:00

  1. core-ci voted on patch set 2 V +1 10/19/21, 15:24 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18325

  2. core-ci voted on patch set 1 V +1 10/19/21, 15:24 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18324

  3. Helmut Hummel uploaded patch set 3 10/19/21, 20:46

  4. core-ci voted on patch set 3 V +1 10/19/21, 21:09 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18348

  5. Wouter Wolters commented on patch set 3 10/19/21, 21:14

    PackageArtifactBuilder.php:104

    deprecate or remove in TYPO3 v12

    PackageArtifactBuilder.php:110

    isn't it better to declare title before the if on 114? Is never used when getTitle() returns a correct value.
  6. Helmut Hummel commented on patch set 3 10/20/21, 08:10

    PackageArtifactBuilder.php:104 Reply

    Ack

    PackageArtifactBuilder.php:110 Reply

    Done
  7. Helmut Hummel uploaded patch set 4 10/20/21, 08:10

  8. core-ci voted on patch set 4 V +1 10/20/21, 08:25 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18370

  9. Simon Gilli commented on patch set 4 10/20/21, 09:48

    PackageManager.php:898

    Do I get it right, the extra section finally looks like this? extra: { "typo3/cms": { "extension-key": "....", "Package": { "title": "...." } } }
  10. Helmut Hummel commented on patch set 4 10/20/21, 10:39

    PackageManager.php:898 Reply

    Correct
  11. Helmut Hummel uploaded patch set 5 10/20/21, 11:30

  12. Helmut Hummel commented on patch set 5 10/20/21, 11:31

    PackageManager.php:898 Reply

    Resolved by not introducing a new public config option for the title for now
  13. core-ci voted on patch set 5 V +1 10/20/21, 11:45 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18382

  14. Benni Mack voted on patch set 5 CR +1 10/20/21, 19:07

  15. Simon Gilli commented on patch set 5 CR -1 10/20/21, 19:39

    PackageArtifactBuilder.php:114

    I'm not happy with such includes. Well, it's done in other places too, I know, but how about using a closure to have a scope isolated include here? See also https://github.com/symfony/symfony/blob/ec34dd592e0411945bdf8e3c0a6a6378cd98fa6f/src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php#L58-L61
  16. Simon Gilli commented on patch set 5 10/20/21, 19:44

    PackageArtifactBuilder.php:114 Reply

    Maybe we sould provide a generic file loader in the core which can be used also in other places...
  17. Benni Mack commented on patch set 5 10/21/21, 07:19

    PackageArtifactBuilder.php:114 Reply

    I think we should keep this change (especially in the ArtifactBuilder) as lowlevel as possible. By the way, this change allows us to get rid of most of the other "include" places in Core, so I'm for keeping it like this.
  18. Simon Gilli commented on patch set 5 10/21/21, 10:03

    PackageArtifactBuilder.php:114 Reply

    Yes true, the ArtifactBuilder is some kind of special and should not relay on too much core code. This isn't a blocker for this patch sure, just like to have other opinions. If Helmut also agrees I will continue with testing this patch...
  19. Simon Gilli voted on patch set 5 V +1 10/21/21, 10:23

  20. Helmut Hummel commented on patch set 5 10/21/21, 10:48

    PackageArtifactBuilder.php:114 Reply

    The code here is, like you said an exact copy of other places that reads the emconf files. I agree this code is ugly. But: * This code has lead to 0 issues in a decade for this use case * The goal is to remove the need for these files (and therefore this code can just be deleted entirely in a pretty near future) Adding a scoped include makes only sense to avoid potential issues in the future, which didn't exist in the past, but would still keep the general ugliness of this "API". So I came to the conclusion to keep this as bare bone as we can have it and remove the whole concept as quickly as possible.
  21. Helmut Hummel commented on patch set 5 10/21/21, 10:49

    PackageArtifactBuilder.php:114 Reply

    I mark this as resolved
  22. Simon Gilli voted on patch set 5 CR +1 10/21/21, 10:50

  23. Benni Mack voted on patch set 5 V +1 10/21/21, 12:12

  24. Helmut Hummel voted on patch set 5 V +2 CR +2 10/21/21, 12:26

  25. Helmut Hummel merged patch set 6 10/21/21, 12:27