Problem/Motivation

We did this not long ago in #3113985: Update dependencies for Drupal 9 but there have been a few updates since, we should upgrade all our dependencies before beta 1.

Proposed resolution

Run composer update --with-dependencies and commit.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

The following PHP dependencies have been updated since 9.0.0-beta1:

  • Symfony components have been updated from 4.4.4 to 4.4.5.
  • Composer has been updated from 1.9.3 to 1.10.0, and composer/installers is no longer pinned in drupal/core-recommended. comopser/installers may now be upgraded whenever a new version is available and a Composer-managed site runs composer update.
  • Several development dependencies including behat/mink-browserkit-driver, composer/xdebug-handler, phpdocumentor/reflection-docblock, phpdocumentor/type-resolver, and phpspec/prophecy have been updated to the latest compatible minor or patch versions.

Comments

longwave created an issue. See original summary.

longwave’s picture

Status: Active » Needs review
StatusFileSize
new35.26 KB
$ composer-lock-diff --no-links
+------------------------------+--------+--------+
| Production Changes           | From   | To     |
+------------------------------+--------+--------+
| symfony/console              | v4.4.4 | v4.4.5 |
| symfony/debug                | v4.4.4 | v4.4.5 |
| symfony/dependency-injection | v4.4.4 | v4.4.5 |
| symfony/error-handler        | v4.4.4 | v4.4.5 |
| symfony/event-dispatcher     | v4.4.4 | v4.4.5 |
| symfony/http-foundation      | v4.4.4 | v4.4.5 |
| symfony/http-kernel          | v4.4.4 | v4.4.5 |
| symfony/mime                 | v5.0.4 | v5.0.5 |
| symfony/process              | v4.4.4 | v4.4.5 |
| symfony/routing              | v4.4.4 | v4.4.5 |
| symfony/serializer           | v4.4.4 | v4.4.5 |
| symfony/translation          | v4.4.4 | v4.4.5 |
| symfony/validator            | v4.4.4 | v4.4.5 |
| symfony/var-dumper           | v5.0.4 | v5.0.5 |
| symfony/yaml                 | v4.4.4 | v4.4.5 |
+------------------------------+--------+--------+

+-----------------------------------+--------+--------+
| Dev Changes                       | From   | To     |
+-----------------------------------+--------+--------+
| composer/xdebug-handler           | 1.4.0  | 1.4.1  |
| phpdocumentor/reflection-docblock | 5.0.0  | 5.1.0  |
| phpdocumentor/type-resolver       | 1.0.1  | 1.1.0  |
| symfony/browser-kit               | v4.4.4 | v4.4.5 |
| symfony/css-selector              | v4.4.4 | v4.4.5 |
| symfony/dom-crawler               | v4.4.4 | v4.4.5 |
| symfony/filesystem                | v4.4.4 | v4.4.5 |
| symfony/finder                    | v4.4.4 | v4.4.5 |
| symfony/lock                      | v4.4.4 | v4.4.5 |
| symfony/phpunit-bridge            | v4.4.4 | v4.4.5 |
+-----------------------------------+--------+--------+
longwave’s picture

Status: Needs review » Needs work

The last submitted patch, 2: 3117342.patch, failed testing. View results

longwave’s picture

DomCrawler related fails could be to do with https://github.com/symfony/symfony/pull/34059

alexpott’s picture

Status: Needs work » Needs review
StatusFileSize
new704 bytes
new35.95 KB

This fixes one of the tests locally.

Status: Needs review » Needs work

The last submitted patch, 6: 3117342-6.patch, failed testing. View results

alexpott’s picture

I'm trying to convince Symfony to revert this change - see https://github.com/symfony/symfony/pull/34059 - sounds like a revert is going to happen.

alexpott’s picture

So the upstream revert occurred.

longwave’s picture

Status: Needs work » Needs review
StatusFileSize
new42.67 KB

Let's try again with symfony/dom-crawler 4.4.x-dev and see what we need to fix while waiting for Symfony 4.4.6.

edit: oh, the revert was only done in the 3.4 branch so far, so this won't work anyway :(

$ composer-lock-diff --no-links
+------------------------------+--------+--------+
| Production Changes           | From   | To     |
+------------------------------+--------+--------+
| symfony/console              | v4.4.4 | v4.4.5 |
| symfony/debug                | v4.4.4 | v4.4.5 |
| symfony/dependency-injection | v4.4.4 | v4.4.5 |
| symfony/error-handler        | v4.4.4 | v4.4.5 |
| symfony/event-dispatcher     | v4.4.4 | v4.4.5 |
| symfony/http-foundation      | v4.4.4 | v4.4.5 |
| symfony/http-kernel          | v4.4.4 | v4.4.5 |
| symfony/mime                 | v5.0.4 | v5.0.5 |
| symfony/process              | v4.4.4 | v4.4.5 |
| symfony/routing              | v4.4.4 | v4.4.5 |
| symfony/serializer           | v4.4.4 | v4.4.5 |
| symfony/translation          | v4.4.4 | v4.4.5 |
| symfony/validator            | v4.4.4 | v4.4.5 |
| symfony/var-dumper           | v5.0.4 | v5.0.5 |
| symfony/yaml                 | v4.4.4 | v4.4.5 |
+------------------------------+--------+--------+

+-----------------------------------+---------+-----------+
| Dev Changes                       | From    | To        |
+-----------------------------------+---------+-----------+
| behat/mink                        | a534fe7 | ccef198   |
| composer/composer                 | 1.9.3   | 1.10.0    |
| composer/xdebug-handler           | 1.4.0   | 1.4.1     |
| phpdocumentor/reflection-docblock | 5.0.0   | 5.1.0     |
| phpdocumentor/type-resolver       | 1.0.1   | 1.1.0     |
| phpspec/prophecy                  | v1.10.2 | v1.10.3   |
| symfony/browser-kit               | v4.4.4  | v4.4.5    |
| symfony/css-selector              | v4.4.4  | v4.4.5    |
| symfony/dom-crawler               | v4.4.4  | 4.4.x-dev |
| symfony/filesystem                | v4.4.4  | v4.4.5    |
| symfony/finder                    | v4.4.4  | v4.4.5    |
| symfony/lock                      | v4.4.4  | v4.4.5    |
| symfony/phpunit-bridge            | v4.4.4  | v4.4.5    |
+-----------------------------------+---------+-----------+

Status: Needs review » Needs work

The last submitted patch, 10: 3117342-10-do-not-commit.patch, failed testing. View results

longwave’s picture

Status: Needs work » Needs review
StatusFileSize
new43.05 KB

We can say that we explicitly don't want symfony/dom-crawler 4.4.5, but anything else is OK?

A deprecation message has also changed which is the cause of some other failures, fixed here.

$ composer-lock-diff --no-links
+------------------------------+--------+--------+
| Production Changes           | From   | To     |
+------------------------------+--------+--------+
| symfony/console              | v4.4.4 | v4.4.5 |
| symfony/debug                | v4.4.4 | v4.4.5 |
| symfony/dependency-injection | v4.4.4 | v4.4.5 |
| symfony/error-handler        | v4.4.4 | v4.4.5 |
| symfony/event-dispatcher     | v4.4.4 | v4.4.5 |
| symfony/http-foundation      | v4.4.4 | v4.4.5 |
| symfony/http-kernel          | v4.4.4 | v4.4.5 |
| symfony/mime                 | v5.0.4 | v5.0.5 |
| symfony/process              | v4.4.4 | v4.4.5 |
| symfony/routing              | v4.4.4 | v4.4.5 |
| symfony/serializer           | v4.4.4 | v4.4.5 |
| symfony/translation          | v4.4.4 | v4.4.5 |
| symfony/validator            | v4.4.4 | v4.4.5 |
| symfony/var-dumper           | v5.0.4 | v5.0.5 |
| symfony/yaml                 | v4.4.4 | v4.4.5 |
+------------------------------+--------+--------+

+-----------------------------------+---------+---------+
| Dev Changes                       | From    | To      |
+-----------------------------------+---------+---------+
| behat/mink-browserkit-driver      | 1.3.3   | v1.3.4  |
| composer/composer                 | 1.9.3   | 1.10.0  |
| composer/xdebug-handler           | 1.4.0   | 1.4.1   |
| phpdocumentor/reflection-docblock | 5.0.0   | 5.1.0   |
| phpdocumentor/type-resolver       | 1.0.1   | 1.1.0   |
| phpspec/prophecy                  | v1.10.2 | v1.10.3 |
| symfony/browser-kit               | v4.4.4  | v4.4.5  |
| symfony/css-selector              | v4.4.4  | v4.4.5  |
| symfony/filesystem                | v4.4.4  | v4.4.5  |
| symfony/finder                    | v4.4.4  | v4.4.5  |
| symfony/lock                      | v4.4.4  | v4.4.5  |
| symfony/phpunit-bridge            | v4.4.4  | v4.4.5  |
+-----------------------------------+---------+---------+
berdir’s picture

+++ b/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php
@@ -152,7 +152,7 @@ public static function getSkippedDeprecations() {
       'The signature of the "Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher::dispatch()" method should be updated to "dispatch($event, string $eventName = null)", not doing so is deprecated since Symfony 4.3.',
       'Calling the "Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch()" method with the event name as the first argument is deprecated since Symfony 4.3, pass it as the second argument and provide the event object as the first argument instead.',
-      'The "Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher::dispatch()" method will require a new "string|null $eventName" argument in the next major version of its parent class "Symfony\Contracts\EventDispatcher\EventDispatcherInterface", not defining it is deprecated.',
+      'The "Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher::dispatch()" method will require a new "string|null $eventName" argument in the next major version of its interface "Symfony\Contracts\EventDispatcher\EventDispatcherInterface", not defining it is deprecated.',
       'Passing a command as string when creating a "Symfony\Component\Process\Process" instance is deprecated since Symfony 4.2, pass it as an array of its arguments instead, or use the "Process::fromShellCommandline()" constructor if you need features provided by the shell.',
       'Passing arguments to "Symfony\Component\HttpFoundation\Request::isMethodSafe()" has been deprecated since Symfony 4.4; use "Symfony\Component\HttpFoundation\Request::isMethodCacheable()" to check if the method is cacheable instead.',
       'The "Symfony\Component\Process\Process::inheritEnvironmentVariables()" method is deprecated since Symfony 4.4, env variables are always inherited.',

should we keep both versions instead of changing it, so that it doesn't start to show up in case someone still has the old version? min-version testing and stuff like that.

alexpott’s picture

#13 is tricky because essentially nothing is being tested. It seems harmless to keep in mind so why not - we can remove both when we've fix the root cause.

+++ b/composer.json
@@ -32,7 +32,7 @@
-        "symfony/dom-crawler": "^4.4",
+        "symfony/dom-crawler": "^4.4, !=4.4.5",

<3 This is a great idea.

catch’s picture

Status: Needs review » Needs work

For #13 we could also raise the minimums above to ones with the old messages since we haven't released yet, there's an open issue discussing keeping out minimum versions inline with what's in composer.lock

Needs work for either option though I think.

longwave’s picture

Status: Needs work » Needs review
StatusFileSize
new42.89 KB
new3.55 KB

Added both deprecation messages, as that seems simplest for now; we don't need to bump the minimum version just for this.

Also changed the constraint slightly as you don't need both comma and space for AND, just space is needed.

alexpott’s picture

Status: Needs review » Reviewed & tested by the community

This looks great. RTBCing because this patch no longer contains my work.

  • catch committed 0d78f4c on 9.0.x
    Issue #3117342 by longwave, alexpott: Update dependencies for Drupal 9
    
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed 0d78f4c and pushed to 9.0.x. Thanks!

xjm’s picture

Issue tags: +9.0.0 release notes

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

pameeela’s picture

Issue tags: +Needs release note

Not sure how we summarise this in release notes - do we list all the changes, or link to a list somewhere else?

xjm’s picture

Status: Closed (fixed) » Needs work

The summary in #3122112: Update dependencies for Drupal 8.9 has an example (not the raw command output, but the listed "highlights").

xjm’s picture

Issue summary: View changes
Status: Needs work » Fixed
Issue tags: -Needs release note

Wrote a release note (and rolled in #3134648: [backport, needs scheduling] Don't pin the composer/installers version in drupal/core-recommended since it is best mentioned in context of the Composer update).

xjm’s picture

Issue summary: View changes

Oops, this was already in beta2. I'll add this to the published release notes there.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.