Review main Merged

64263[TASK] Allow DI based services in localconf during extension install

Benjamin Franzke CR +2 V +2 Normal +43 −8 updated 04/27/20, 19:13

Commit message

We fix PackageManager and ContainerBuilder to allow
multiple container instances (including multiple
cache identifiers) to be live.
ExtensionManager will now load a new symfony container
after installing a new extension, and before reloading
all ext_localconf files. We need to ensure that possible
services in ext_localconf can be loaded when they
depend on symfony DI.

Note: This is not a BUGFIX as this was never
supported for extensions. But it may lead to hard-to-debug
bugs when extension developers add a service to ext
localconf but do not test the re-installation procedure
before publishing the extension to TER.

Review

  • Code review CR +2 Done
    • Andreas Kienast +2
    • Raphael Zschorsch +1
    • Simon Gilli +1
  • Verified V +2 Done
    • Andreas Kienast +2
    • Raphael Zschorsch +1
    • Simon Gilli +1
    • TYPO3com +1 CI

Issues 1

Files 4

Review log 1417

  1. Benjamin Franzke uploaded patch set 1 04/20/20, 17:19

  2. TYPO3com voted on patch set 1 V -1 04/20/20, 17:31 Completed build in 11m 44s on Mon, 20 Apr, 05:31 PM Test Summary: 36 of 74141 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2913

  3. Benjamin Franzke uploaded patch set 2 04/21/20, 07:51

  4. TYPO3com voted on patch set 2 V +1 04/21/20, 08:08 Completed build in 16m 07s on Tue, 21 Apr, 08:08 AM Test Summary: 73657 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2943

  5. Benjamin Franzke commented on patch set 2 CR -1 04/21/20, 08:18

    TODO: Still need to test the following codepath: Update (not install) an Extension in classic mode via ExtensionManager that starts to introduce DI while also trying to use a class that depends on DI via GeneralUtility::makeInstance in ext_localconf (like EXT:news did).
  6. Benjamin Franzke commented on patch set 2 CR 0 04/27/20, 05:56

    Can not test the additional update codepath because the test extension is currently blocked by a TER issue: https://gitlab.typo3.org/t3o/ter/issues/448 Still, I'd like to see this install-codepath fix to be included into the upcoming patch release. In the meantime it was reported that this patch allows to listen to the TYPO3\CMS\Core\Package\Event\AfterPackageActivationEvent in an extension that is about to be installed: https://typo3.slack.com/archives/C025BQLFA/p1587719153181900 That case also requires an ad-hoc container re-generation after an extension has been installed.
  7. Simon Gilli commented on patch set 2 CR -1 04/27/20, 06:09

    ContainerBuilder.php:38 Unresolved

    Code below accesses this var as array, annotation should be fixed
  8. Benjamin Franzke uploaded patch set 3 04/27/20, 06:22

  9. Simon Gilli voted on patch set 3 CR +1 04/27/20, 06:24

  10. Benjamin Franzke wrote 04/27/20, 06:37

    Topic set to di
  11. TYPO3com voted on patch set 3 V +1 04/27/20, 07:32 Completed build in 11m 41s on Mon, 27 Apr, 07:32 AM Test Summary: 73656 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3041

  12. Raphael Zschorsch voted on patch set 3 V +1 CR +1 04/27/20, 09:20

  13. Benjamin Franzke commented on patch set 3 04/27/20, 18:10

    InstallUtility.php:47 Unresolved

    Note: This adds an implicit dependency from EXT:extensionmananger to EXT:install (which is ok for v10, bot not nice). We can not move LateBootService to EXT:core right now, as TYPO3-Console already makes use of that class (it is a comproise we agreed on, because it would have been hard for TYPO3-Console to support v10 otherwise). We'll probably more LateBootService into core later (and maybe provide a class alias for typo3-console) – but for now this patch should go into tomorrows release with this little quirk.
  14. Simon Gilli commented on patch set 3 V +1 04/27/20, 18:56

  15. Andreas Kienast voted on patch set 3 CR +1 04/27/20, 19:00

  16. Andreas Kienast voted on patch set 3 V +2 CR +2 04/27/20, 19:13

  17. Andreas Kienast merged patch set 4 04/27/20, 19:13