Review main Merged

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

Benni Mack CR +2 V +2 Easy +3 −3 updated 09/08/20, 20:21

Commit message

With the introduction of symfony/event-dispatcher-contracts
in https://git.typo3.org/Packages/TYPO3.CMS.git/commit/e4a1ae8762ee99712e4e5c9c2f8a3876bce97620

this change forced support for symfony5 in composer-based installations
(although non-composer-based installations use symfony5 bundled already),
as contracts v2 is only compatible with symfony v5, but contracts
v1 is used for symfony4.

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.

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

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Georg Ringer +1
    • Simon Gilli +1
    • Richard Haeser +1
    • Oliver Hader +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Georg Ringer +1
    • Simon Gilli +1
    • TYPO3com +1 CI

Issues 1

Files 3

Review log 1618

  1. Benni Mack uploaded patch set 1 09/08/20, 09:40

  2. Simon Gilli commented on patch set 1 09/08/20, 09:47

    Unresolved

    Should we add here a Related: #92066?

    composer.lock:1913

    Seems this was not correctly locked, no need to increase the version here imho
  3. Simon Gilli commented on patch set 1 09/08/20, 09:52

    The change looks fine, there is no diff between 1.x and 2.x see https://github.com/symfony/event-dispatcher-contracts/compare/v2.0.1...v1.1.1
  4. TYPO3com voted on patch set 1 V +1 09/08/20, 09:52 Completed build in 11m 35s on Tue, 8 Sep, 09:52 AM Test Summary: 73227 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5359

  5. Simon Gilli commented on patch set 1 V +1 CR -1 09/08/20, 10:04

    Looks fine but see my comments
  6. Simon Gilli uploaded patch set 2 09/08/20, 10:16

  7. Simon Gilli voted on patch set 2 V +1 CR +1 09/08/20, 10:18

  8. Simon Gilli commented on patch set 2 09/08/20, 10:20

    composer.lock:1913 Reply

    Done
  9. Georg Ringer commented on patch set 1 CR -1 09/08/20, 10:21

    only tested in 10 and after applying the commands from commit msg, I still can't install "c req solarium/solarium:^4.2"
  10. Simon Gilli commented on patch set 2 09/08/20, 10:25

    > Patch Set 1: Code-Review-1 > > only tested in 10 and after applying the commands from commit msg, I still can't install "c req solarium/solarium:^4.2" Will check again with your setup, should work imho....
  11. TYPO3com voted on patch set 2 V +1 09/08/20, 10:27 Completed build in 10m 39s on Tue, 8 Sep, 10:27 AM Test Summary: 73227 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5361

  12. Simon Gilli commented on patch set 2 09/08/20, 10:41

    > Patch Set 2: > > > Patch Set 1: Code-Review-1 > > > > only tested in 10 and after applying the commands from commit msg, I still can't install "c req solarium/solarium:^4.2" > > Will check again with your setup, should work imho.... Tested again and I was able to require solarium/solarium:^4.2. Perhaps your existing composer.lock and/or vendor folder blocks you...
  13. Oliver Hader voted on patch set 2 CR +1 09/08/20, 10:50

  14. Georg Ringer voted on patch set 2 V +1 CR +1 09/08/20, 11:01

  15. Richard Haeser voted on patch set 2 CR +1 09/08/20, 11:13

  16. Benjamin Franzke commented on patch set 2 V +2 CR +2 09/08/20, 13:59

    Yea, so the issue isn't directly that event-dispatcher-contracts v2.0 isn't v4 compatible (there is NO difference between v1 and v2), but that symfony v4 pulls in version 1.0 and doesn't pull in v2. What a mess: https://packagist.org/packages/symfony/event-dispatcher#v4.4.13 IMO https://packagist.org/packages/symfony/event-dispatcher-contracts should have defined a conflict against symfony v4, or symfony v4 should have been updated to be compatible with event-constracts v2 – anyway, this patch is fine. I tested with a composer based installation where installation against symfony v4 was successfull.
  17. Benjamin Franzke merged patch set 3 09/08/20, 14:00

  18. Simon Gilli commented on patch set 3 09/08/20, 20:21

    https://github.com/symfony/event-dispatcher-contracts/compare/v1.1.1...v2.2.0 delivers a complete other result than my tested link before https://github.com/symfony/event-dispatcher-contracts/compare/v2.0.1...v1.1.1. This patch needs to be reverted because it's not working properly!