Review main Merged

65644[BUGFIX] Add support for symfony/event-dispatcher-contracts v1

Benjamin Franzke CR +2 V +2 Normal +49 −52 updated 09/09/20, 21:34

Commit message

With the introduction of symfony/event-dispatcher-contracts
in https://git.typo3.org/Packages/TYPO3.CMS.git/commit/e4a1ae8762ee99712
we forced usage of symfony5 in composer-based installations where
installation with symfony4 was possible before. This is because event
contracts v2 is only compatible with symfony v5, but contracts v1 needs to
be supported for symfony4 compatibility.

Note: although non-composer-based installations used symfony5 bundled
already, composer mode could still use symfony v4 if needed.

We now add a new intermediate composer package that is available in two
different versions, and offers a compatible symfony event dispatcher
adapter for the respective interfaces in symfony v4 and symfony v5 in each
of these version. typo3/cms-core allows to install both versions which
means we can provide a compatible adapter for both, symfony v4 and v5.

This change allows composer-based installations to support both
versions (v5/v4) again, so extensions like EXT:solr (which requires
a package called solarium) to work with the dependency constraints
of TYPO3 Core.

Commands used:

  composer require --no-update --working-dir=typo3/sysext/core \
    "symfony/event-dispatcher-contracts:^1.1 || ^2.0" \
    "typo3/symfony-psr-event-dispatcher-adapter:^1.0 || ^2.0"

  composer require --no-update \
    "symfony/event-dispatcher-contracts:^1.1 || ^2.0" \
    "typo3/symfony-psr-event-dispatcher-adapter:^1.0 || ^2.0"

  composer update --lock

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Simon Gilli +1
    • Helmut Hummel +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Simon Gilli +1
    • Helmut Hummel +1
    • TYPO3com +1 CI

Issues 1

Files 6

Review log 1826

Show 1 earlier messages
  1. Benjamin Franzke uploaded patch set 1 09/09/20, 08:22

  1. TYPO3com voted on patch set 1 V -1 09/09/20, 08:54 Completed build in 32m 20s on Wed, 9 Sep, 08:54 AM Test Summary: 5457 of 73658 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5388

  2. Benjamin Franzke uploaded patch set 2 09/09/20, 08:58

  3. TYPO3com voted on patch set 2 V -1 09/09/20, 09:13 Completed build in 13m 47s on Wed, 9 Sep, 09:13 AM Test Summary: 1 of 73659 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5391

  4. TYPO3com voted on patch set 2 V +1 09/09/20, 09:52 Completed build in 14m 18s on Wed, 9 Sep, 09:52 AM Test Summary: 73173 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5397

  5. Simon Gilli commented on patch set 2 CR +1 09/09/20, 11:22

    Looks good! Some we finally get it in without anymore conflicts. For the completness for others, I researched yesterday night for a solution and the other possibility would be a very dirty hack using the reflection on the interface and an if clause in the beginning to load the correct interface implementation. I'm all in for this solution which can be merged back to core once we remove Symfony 4.4 support.
    Do we need the term PSR at all here as there it's the one and only event-dispatcher in Symfony nowadays? I would prefer typo3/symfony-event-dispatcher-adapter
  6. Simon Gilli commented on patch set 2 09/09/20, 11:27

    Can we please have your opinion for the new implementation of the yesterday's patch you voted. The other "solution" would be to revert my patch https://review.typo3.org/c/Packages/TYPO3.CMS/+/65405 which sadly introduced the accidental removal of the Symfony 4.4 support for the yesterday's release.
  7. Benjamin Franzke uploaded patch set 3 09/09/20, 11:29

  8. Benjamin Franzke commented on patch set 3 09/09/20, 11:36

    Reply

    Yea, well, not sure, I thought about https://packagist.org/packages/typo3/phar-stream-wrapper which is in use by non-typo3 projects as well, and typo3/symfony-psr-event-dispatcher-adapter would describe that the package adapts to Symfony\EventDispatcher from Psr\EventDispatcher – because it's rather not just a Symfony -> TYPO3 Adapter, but Symfony -> PSR – and may be of use for others as well. So "typo3/" is really just there because we maintain that package.
  9. Benjamin Franzke uploaded patch set 4 09/09/20, 11:39

  10. TYPO3com voted on patch set 3 V +1 09/09/20, 11:41 Completed build in 11m 40s on Wed, 9 Sep, 11:41 AM Test Summary: 73173 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5406

  11. Simon Gilli commented on patch set 4 09/09/20, 11:44

    Reply

    Yeah, good thought, agree. typo3/symfony-psr-event-dispatcher-adapter sound nice, before you missed the dispatcher term, but I think it's important here or isn't it?
  12. TYPO3com voted on patch set 4 V -1 09/09/20, 11:52 Completed build in 12m 31s on Wed, 9 Sep, 11:52 AM Test Summary: 1 of 73658 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5407

  13. Benjamin Franzke commented on patch set 4 09/09/20, 11:54

    Reply

    Yep, I agree, and therefore added that to the TODO in Patchset 4 in the meantime.
  14. TYPO3com voted on patch set 4 V +1 09/09/20, 12:08 Completed build in 13m 28s on Wed, 9 Sep, 12:08 PM Test Summary: 73173 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5410

  15. Benjamin Franzke uploaded patch set 5 09/09/20, 18:57

  16. TYPO3com voted on patch set 5 V +1 09/09/20, 19:08 Completed build in 10m 50s on Wed, 9 Sep, 07:08 PM Test Summary: 73173 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5443

  17. Simon Gilli voted on patch set 5 CR +1 09/09/20, 20:24

  18. Benjamin Franzke uploaded patch set 6 09/09/20, 20:38

  19. TYPO3com voted on patch set 6 V +1 09/09/20, 20:51 Completed build in 12m 12s on Wed, 9 Sep, 08:51 PM Test Summary: 73173 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5448

  20. Benjamin Franzke voted on patch set 6 V +1 CR +1 09/09/20, 20:54

  21. Simon Gilli voted on patch set 6 CR +1 09/09/20, 20:56

  22. Helmut Hummel voted on patch set 6 V +1 CR +1 09/09/20, 21:09

  23. Simon Gilli voted on patch set 6 V +1 09/09/20, 21:22

  24. Benjamin Franzke voted on patch set 6 V +2 CR +2 09/09/20, 21:34

  25. Benjamin Franzke merged patch set 7 09/09/20, 21:34