Review main Merged

71877[BUGFIX] Use package information to list extensions in Extension Manager

Helmut Hummel CR +2 V +2 Easy +21 −8 updated 01/20/22, 14:07

Commit message

The CLI command extension:list already uses package information
for listing extensions, whereas Extension Manager still scans for and
prefers information from ext_emconf.php and install path.

Adapt EM to also prefer package manager information.

Review

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

Issues 1

Files 2

Review log 3139

Show 1014 earlier messages
  1. Helmut Hummel uploaded patch set 1 10/18/21, 16:58

  2. Simon Schaufelberger commented on patch set 1 10/18/21, 17:04

    ListUtility.php:203

    PHP Inspections Phpstorm plugin complains here that the `...properties` operator should be used instead.
  3. Simon Schaufelberger commented on patch set 1 10/18/21, 17:08

  4. core-ci voted on patch set 1 V -1 10/18/21, 17:09 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18288

  5. Stefan Bürk commented on patch set 1 10/18/21, 18:54

    ListUtility.php:203 Reply

    That would not work, as unpacking arrays with string keys are not allowed - as far as I know. That feature will be added with php8.1. Anyway phpstan complainet here in ci. Maybe use paranthese here (not nested, suggestion into the blue)? ``` $properties = array_merge((($emConf ?? [] ) ?: []), $properties); or if(!is_array($emConf ?? [])) { $emConf = []; } $properties = array_merge(($emConf ?? []), $properties); ```
  6. Simon Gilli commented on patch set 1 V +1 10/18/21, 18:55

    Thx, works like expected!
  7. Guido Schmechel updated the commit message in patch set 2 10/18/21, 19:32

  8. core-ci voted on patch set 2 V -1 10/18/21, 19:44 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18290

  9. Simon Gilli uploaded patch set 3 10/18/21, 22:24

  10. Simon Gilli uploaded patch set 4 10/18/21, 22:26

  11. Simon Gilli commented on patch set 4 10/18/21, 22:26

    ListUtility.php:203 Reply

    The issue is the phpdoc of includeEmConf() where array|bool is declared but array|false is returned.
  12. core-ci voted on patch set 3 V -1 10/18/21, 22:37 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18292

  13. core-ci voted on patch set 4 V -1 10/18/21, 22:44 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18293

  14. Simon Gilli uploaded patch set 5 10/19/21, 09:09

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

  2. Simon Gilli voted on patch set 5 V +1 CR +1 10/19/21, 09:29

  3. Stefan Bürk commented on patch set 5 10/19/21, 09:32

    ListUtility.php:208

    Does that mean that version is always used from composer package information, even in legacy installs and extensions still having em_conf.php ?
  4. Oliver Hader commented on patch set 5 10/19/21, 09:35

    The previously failing tests in `ListUtilityTest` reveal the architectural flaw - however it's fine for a quick fix. To migrate from `ext_emconf.php` to Composer-Manifest, probably a new adapter `ExtensionMetaData` would be nice which either takes data from Composer and/or `ext_emconf.php`. That way domain-specific meta-data for the concept of an "extension" would be bundled in one class.

    ListUtility.php:21

    PackageInterface?
  5. Helmut Hummel commented on patch set 5 10/19/21, 10:05

    ListUtility.php:21 Reply

    Ack

    ListUtility.php:208 Reply

    In legacy system the version information is pulled from em_conf.php by the PackageManager. This means using the PM API here means it is always the correct information: in legacy system it is from ext_emconf.php in Composer based systems it is the version installed by Composer
  6. Oliver Hader commented on patch set 5 10/19/21, 10:06

    I'm on it...
  7. Helmut Hummel commented on patch set 5 10/19/21, 10:17

    Reply

    I would prefer to have the abstraction in the Package Factory (currently inside PackageManager), which already consolidates the information from either composer.json or ext_emconf.php or the Composer install process.
  8. Oliver Hader uploaded patch set 6 10/19/21, 11:25

  9. Helmut Hummel commented on patch set 6 10/19/21, 11:30

    ListUtility.php:206

    With this still in place, this would not fix the initial issue at all. Why do you think it is necessary to skip packages without emconf here?
  10. core-ci voted on patch set 6 V -1 10/19/21, 11:36 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18305

  11. Helmut Hummel voted on patch set 6 CR -1 10/19/21, 11:44

  12. Helmut Hummel commented on patch set 6 CR 0 10/19/21, 11:48

    ListUtility.php:206 Reply

    never mind. all fine here
  13. Helmut Hummel uploaded patch set 7 10/19/21, 11:55

  14. Oliver Hader voted on patch set 7 V +1 CR +1 10/19/21, 11:58

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

  16. Helmut Hummel uploaded patch set 8 10/19/21, 12:21

  17. Simon Gilli commented on patch set 8 V -1 CR +1 10/19/21, 12:33

    on it...
  18. Oliver Hader voted on patch set 8 V +1 CR +1 10/19/21, 12:33

  19. core-ci voted on patch set 8 V +1 10/19/21, 12:35 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18308

  20. Simon Gilli voted on patch set 8 V +1 10/19/21, 12:39

  21. Helmut Hummel voted on patch set 8 V +2 CR +2 10/19/21, 12:41

  22. Helmut Hummel merged patch set 9 10/19/21, 12:41

  23. Stefan Bürk commented on patch set 9 01/19/22, 18:45

    ListUtility.php:129

    $properties is undefined in this method - missed to retrieve it or should this be another variable - but I'm not into this all - or is this subfallback superflous ?
  24. Helmut Hummel commented on patch set 9 01/20/22, 11:49

    ListUtility.php:129 Reply

    "subfallback" can indeed be removed. str_starts_with($version, 'dev-') ? 'alpha' : 'stable' is fine (from reading)
  25. Stefan Bürk commented on patch set 9 01/20/22, 14:07

    ListUtility.php:129 Reply