Problem/Motivation
Drupal 9 should release on Symfony 4.4. Since that is not yet released, we should lock to a good -dev commit for development, and update to the full release after it comes out in November.
Proposed resolution
Heres a composer update --dry-run
ran on php 7.2. Note, the symfony versions are actually getting updated to 4.4-dev.
I expect other non-symfony dependencies will need to be adjusted now that we can support php 7.2, but I think we should get this issue committed and then break out other dependency changes to their own issues.
- Uninstalling symfony/polyfill-php70 (v1.12.0)
- Uninstalling paragonie/random_compat (v9.99.99)
- Uninstalling phpunit/phpunit-mock-objects (5.0.10)
- Updating symfony/css-selector (v3.4.32) to symfony/css-selector (4.4.x-dev 1f8fa58)
- Updating symfony/phpunit-bridge (v3.4.32) to symfony/phpunit-bridge (4.4.x-dev ed7630d)
- Updating symfony/filesystem (v3.4.32) to symfony/filesystem (4.4.x-dev f903e39)
- Updating symfony/finder (v3.4.32) to symfony/finder (4.4.x-dev 30898bb)
- Updating symfony/lock (v3.4.32) to symfony/lock (4.4.x-dev 03d9a1d)
- Updating symfony/dom-crawler (v3.4.32) to symfony/dom-crawler (v4.3.5)
- Updating symfony/browser-kit (v3.4.32) to symfony/browser-kit (4.4.x-dev eeade40)
- Updating symfony/yaml (v3.4.32) to symfony/yaml (4.4.x-dev 8caed6e)
- Updating symfony/process (v3.4.32) to symfony/process (4.4.x-dev 5ec7407)
- Installing symfony/translation-contracts (v1.1.7)
- Updating symfony/validator (v3.4.32) to symfony/validator (4.4.x-dev 137d3f6)
- Updating symfony/translation (v3.4.32) to symfony/translation (4.4.x-dev 01a25cb)
- Updating symfony/serializer (v3.4.32) to symfony/serializer (4.4.x-dev c7e56d8)
- Installing symfony/event-dispatcher-contracts (v1.1.7)
- Updating symfony/event-dispatcher (v3.4.32) to symfony/event-dispatcher (4.4.x-dev c73bdef)
- Installing symfony/service-contracts (v1.1.7)
- Updating symfony/dependency-injection (v3.4.32) to symfony/dependency-injection (4.4.x-dev 556a6b3)
- Installing symfony/polyfill-php73 (v1.12.0)
- Updating symfony/console (v3.4.32) to symfony/console (4.4.x-dev aa43e86)
- Updating jcalderonzumba/gastonjs (v1.0.2) to jcalderonzumba/gastonjs (v1.2.0)
- Updating jcalderonzumba/mink-phantomjs-driver (v0.3.2) to jcalderonzumba/mink-phantomjs-driver (v0.3.3)
- Updating sebastian/resource-operations (1.0.0) to sebastian/resource-operations (2.0.1)
- Updating sebastian/environment (3.1.0) to sebastian/environment (4.2.2)
- Updating sebastian/diff (2.0.1) to sebastian/diff (3.0.2)
- Updating sebastian/comparator (2.1.3) to sebastian/comparator (3.0.2)
- Updating phpunit/php-timer (1.0.9) to phpunit/php-timer (2.1.2)
- Updating phpunit/php-file-iterator (1.4.5) to phpunit/php-file-iterator (2.0.2)
- Updating phpunit/php-token-stream (2.0.2) to phpunit/php-token-stream (3.1.1)
- Updating phpunit/php-code-coverage (5.3.2) to phpunit/php-code-coverage (6.1.4)
- Updating phpdocumentor/reflection-common (1.0.1) to phpdocumentor/reflection-common (2.0.0)
- Updating phpdocumentor/type-resolver (0.5.1) to phpdocumentor/type-resolver (1.0.1)
- Updating doctrine/instantiator (1.0.5) to doctrine/instantiator (1.2.0)
- Updating phar-io/version (1.0.1) to phar-io/version (2.0.1)
- Updating phar-io/manifest (1.0.1) to phar-io/manifest (1.0.3)
- Updating myclabs/deep-copy (1.7.0) to myclabs/deep-copy (1.9.3)
- Updating phpunit/phpunit (6.5.14) to phpunit/phpunit (7.5.16)
- Updating justinrainbow/json-schema (5.2.8) to justinrainbow/json-schema (5.2.9)
- Updating squizlabs/php_codesniffer (3.5.0) to squizlabs/php_codesniffer (3.5.1)
- Updating doctrine/lexer (1.0.2) to doctrine/lexer (1.1.0)
- Updating doctrine/annotations (v1.4.0) to doctrine/annotations (v1.8.0)
- Installing doctrine/reflection (v1.0.0)
- Installing doctrine/event-manager (v1.0.0)
- Updating doctrine/collections (v1.4.0) to doctrine/collections (v1.6.2)
- Updating doctrine/cache (v1.6.2) to doctrine/cache (v1.8.0)
- Installing doctrine/persistence (1.1.1)
- Updating doctrine/inflector (v1.2.0) to doctrine/inflector (v1.3.0)
- Updating doctrine/common (v2.7.3) to doctrine/common (v2.11.0)
- Installing symfony/polyfill-php72 (v1.12.0)
- Installing symfony/polyfill-intl-idn (v1.12.0)
- Installing symfony/mime (v4.3.5)
- Updating symfony/http-foundation (v3.4.32) to symfony/http-foundation (4.4.x-dev 002d69d)
- Updating symfony/debug (v3.4.32) to symfony/debug (4.4.x-dev 25fd3ba)
- Installing symfony/error-renderer (4.4.x-dev fca8c29)
- Installing symfony/error-handler (dev-master b9953ac)
- Updating symfony/http-kernel (v3.4.32) to symfony/http-kernel (4.4.x-dev a228a47)
- Updating symfony/routing (v3.4.32) to symfony/routing (4.4.x-dev 9e472b4)
- Updating symfony-cmf/routing (1.4.1) to symfony-cmf/routing (2.1.0)
- Updating masterminds/html5 (2.3.0) to masterminds/html5 (2.7.0)
- Updating symfony/psr-http-message-bridge (v1.1.2) to symfony/psr-http-message-bridge (v1.2.0)
symfony/event-dispatcher-contracts suggests installing psr/event-dispatcher
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Drupal 9 is now updated from Symfony 3.4.32 to a development version of Symfony 4.4. Because Symfony 4.4 is not yet released, known working git commits have been chosen to support testing Drupal with Symfony 4.4 packages. Later on Symfony 4.4 will be updated to tagged releases as they become available.
Comment | File | Size | Author |
---|---|---|---|
#16 | 3088369-16.patch | 92.45 KB | alexpott |
#16 | 15-16-interdiff.txt | 4.13 KB | alexpott |
#15 | 3088369-15.patch | 91.63 KB | alexpott |
#15 | 14-15-interdiff.txt | 2.46 KB | alexpott |
#14 | 3088369-14.drupal-interdiff.txt | 431 bytes | Berdir |
Comments
Comment #2
mikelutzAlright, so this updates symfony to ^4.4 in composer.json and runs
composer update
with php 7.2There are so many interconnected dependencies around php >7.1 and symfony 3/4 that I really needed to update everything to be able to pull in SF4. just doing
composer update "symfony/*" --with-dependencies
failed to upgrade most of symfony due to conflicts with older versions of other dependencies.So this includes the needed skipped deprecations, and the composer changes. We have one modification to a test to disable APCU which will need a follow-up (see #2976394-246: Allow Symfony 4.4 to be installed in Drupal 8 and #2976394-252: Allow Symfony 4.4 to be installed in Drupal 8 restoring apcu for that test is dependent on #3074585: [Symfony 5] Replace app.root and site.path string services with container parameters
Comment #3
mikelutzOh, you actually want the patch file? Okay, fine...
Comment #4
mikelutzRemoving the class-loader component is really part of a deprecation removal followup.
Comment #5
mikelutzThis will need a reroll once #3079791: Bump Drupal's minimum PHP version to 7.2 as soon as 9.0.x is branched (a higher version may be required later) is in.
Comment #6
mikelutzSome self review - this can just be ~2.1.0 we only needed 1.4 around when we were testing this with D8
Comment #7
mikelutzHere's that small update.
Comment #8
mikelutzThese changes in the lock file concerned me, and after discussing them with the composer team, I see I need to regenerate the lock file.
Comment #10
mikelutzComment #11
mikelutzHere's the reroll, plus fixing the vendor hardening problem. One or two other small adjustments to composer.json to update minimum versions to match the ones installed with sf4.
Comment #12
mikelutzComment #13
mikelutzComment #14
BerdirHere's my try with minimal updates. Beside symfony, I only had to update masterminds/html5 and symfony-cmf/routing. The first is a bit tricky, see #3040037: Update masterminds/html5 to 2.7.5 but we don't have a choice now. Maybe a bit of pressure will help to get lullabot/amp updated ;)
interdiff is only composer.json, had to add dom-crawler there otherwise composer-lock-diff reported it as a non-dev dependency, not sure why.
Comment #15
alexpottSo this is sneaking back in. I think this happens when you've not
rm -rf vendor && composer install
for a while. People need to do that before attempting dependency updates atm.Comment #16
alexpottI think we should change this to add a new isDeprecationSkipped($message): bool method because then we have the logic nicely encapsulated. Also whilst we still have WebTestBase we need to do the dynamic deprecation skipping for it too. Also we could choose to backport the new method and solve the Drupal 10 deprecation skipping in D8 if we choose.
Comment #17
mikelutz+1 on the approach and +1 to rtbc
Comment #18
jibranI was concerned about adding
| symfony/error-handler | NEW | b9953ac |
but then I realiaze everything is in -dev so all good. Patch seems fine to me sot RTBC.I wish we could just remove
symfony-cmf/routing
but we can't, not as is at least.Comment #19
Gábor HojtsyYay! As the massive work of #2976394: Allow Symfony 4.4 to be installed in Drupal 8 lead up to this issue and this was split from there, it would be nice to credit the contributors who were there but not here, since that issue will not receive a commit I assume anymore.
Comment #26
alexpottCrediting people from #2976394: Allow Symfony 4.4 to be installed in Drupal 8
Comment #27
alexpottCreated the follow-up to move off non-development versions - #3088754: Update to Drupal 9 to Symfony 4.4.0
Comment #28
Gábor HojtsyI added the following release notes snippet:
Change record was already at https://www.drupal.org/node/3088712, updated with the same text.
Comment #29
catchNote that this leaves us on Symfony 3.4 for the classloader, because that's been removed in Symfony 4 entirely, but since it's self-contained there's no particular issue being in that situation except it going out of support, and we have a separate critical issue to resolve that.
Committed 1c9842d and pushed to 9.0.x. Thanks!
Comment #31
catchclassloader issue for those interested #3020296: Remove Symfony's classloader as it does not exist in Symfony 4
Comment #32
Gábor HojtsyPublished change record at https://www.drupal.org/node/3088712 :)
Comment #33
DamienMcKennaWasn't this a duplicate of #3009219: Update Symfony to 4.4 in Drupal 9.0? Should that issue and its sub-issues be closed now?
Comment #35
mikelutzYup. Transferring credit and closing the other one.
Comment #36
DamienMcKennaComment #38
Krzysztof DomańskiI added tags to #3088754: Update to Drupal 9 to Symfony 4.4.0. They are no longer needed here.