Review main Merged

39692[BUGFIX] Adhere "suggestions" when resolving ext loading order

Markus Klein CR +2 V +2 Easy +1 −1 updated 05/25/15, 17:19

Commit message

The issue #58701 introduced the functionality to fetch suggestions defined
in composer.json or ext_emconf.php into the Package class.
A copy and paste error causes the loading of the suggestions to
actually fail, so those never reach the DependencyResolver.

This patch fixes the tiny mistake and thus ensures that suggestions
really influence the loading order of extensions.

Review

  • Code review CR +2
    • Xavier Perseguers +2
    • Helmut Hummel +2
    • Wouter Wolters +1
  • Verified V +2
    • Xavier Perseguers +2
    • Helmut Hummel +2

Issues 1

Files 1

Review log 13

  1. Markus Klein uploaded patch set 1 05/24/15, 22:55

  2. Xavier Perseguers commented on patch set 1 CR +1 05/25/15, 06:58

    This is obviously correct. thanks. Though I tested by having both realurl and restdoc (master) and watching their order with: watch "egrep '(restdoc|realurl)' PackageStates.php" When both are loaded, restdoc is put BEFORE realurl. When restdoc gets unloaded, restdoc is reordered after realurl. Now, I add the suggest dependency to ext_emconf.php (no version, just "realurl"). It does not change anything, code is actually not invoked at all for restdoc. (interesting is the "suggestions" of PackageStates.php is still empty). If I remove typo3conf/ext/restdoc/composer.json then it works! and "suggestions" is then populated. So somehow the suggestions are not taken into account when an extension comes with both ext_emconf.php and composer.json. Investigating a bit more.
  3. Xavier Perseguers uploaded patch set 2 05/25/15, 07:16

  4. Xavier Perseguers commented on patch set 2 CR +1 V +1 05/25/15, 07:17

    Now successfully tested with both standard extension coming only with ext_emconf.php and an extension providing composer.json. Additionally already tested with TYPO3 6.2.
  5. Wouter Wolters voted on patch set 2 CR +1 05/25/15, 09:50

  6. Helmut Hummel commented on patch set 2 CR -1 05/25/15, 11:04

    PackageManager.php:796

    Can you explain why this code is needed at all? It does not look right to me.
  7. Xavier Perseguers commented on patch set 2 05/25/15, 12:06

    PackageManager.php:796 Reply

    in my composer.json I put "typo3-ter/realurl" as suggest dependency (see https://forge.typo3.org/issues/67121#composerjson). This is how http://composer.typo3.org tells us to do, so I follow the guide. Now, $this->packages contains a list of extension keys (and possibly other real composer packages), thus it has an entry for "realurl" but not "typo3-ter/realurl" and this needs to be adjusted for the suggestion to work.
  8. Helmut Hummel commented on patch set 2 05/25/15, 12:47

    PackageManager.php:796 Reply

    This is a different issue than the one to be fixed here and should be tackled differently (especially without hardcoding vendor names, as it would fail again for different vendors, which still are TYPO3 extensions
  9. Helmut Hummel uploaded patch set 3 05/25/15, 12:52

  10. Helmut Hummel voted on patch set 3 CR +2 V +2 05/25/15, 12:53

  11. Wouter Wolters voted on patch set 3 CR +1 05/25/15, 13:31

  12. Xavier Perseguers voted on patch set 3 CR +2 V +2 05/25/15, 17:19

  13. Xavier Perseguers merged patch set 3 05/25/15, 17:19