Problem/Motivation

We should ship Drupal 9.0 with the latest versions of our dependencies.

Proposed resolution

Update all dependencies.

Remaining tasks

Patch, test, fix any fallout, commit.

PHPUnit 8.5.3 has a seemingly relevant release note: "expectExceptionMessageRegExp() has been removed in PHPUnit 9 without a deprecation warning being given in PHPUnit 8"

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

Drupal 9 ships with the latest versions of all of its dependencies.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

longwave created an issue. See original summary.

longwave’s picture

Status: Active » Needs review
FileSize
25.98 KB
$ composer-lock-diff --no-links
+--------------------------------------+--------+--------+
| Production Changes                   | From   | To     |
+--------------------------------------+--------+--------+
| composer/installers                  | v1.8.0 | v1.9.0 |
| doctrine/annotations                 | v1.8.0 | 1.10.1 |
| doctrine/reflection                  | v1.1.0 | 1.2.1  |
| laminas/laminas-diactoros            | 2.2.2  | 2.2.3  |
| laminas/laminas-feed                 | 2.12.0 | 2.12.2 |
| laminas/laminas-zendframework-bridge | 1.0.1  | 1.0.3  |
| psr/log                              | 1.1.2  | 1.1.3  |
| symfony-cmf/routing                  | 2.1.1  | 2.2.0  |
+--------------------------------------+--------+--------+

+--------------------+--------+--------+
| Dev Changes        | From   | To     |
+--------------------+--------+--------+
| composer/ca-bundle | 1.2.6  | 1.2.7  |
| composer/composer  | 1.10.0 | 1.10.5 |
| drupal/coder       | 8.3.7  | 8.3.8  |
| phpunit/phpunit    | 8.5.2  | 8.5.3  |
+--------------------+--------+--------+

Status: Needs review » Needs work

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

catch’s picture

Priority: Normal » Critical

Bumping to critical.

longwave’s picture

Status: Needs work » Needs review
FileSize
28.98 KB
3.81 KB

Updated the assertion method in three tests, also the composer lock hash calculation method now has to take the options into account.

mondrake’s picture

+++ b/core/modules/views/tests/src/Kernel/Plugin/ViewsSqlExceptionTest.php
@@ -47,7 +47,7 @@ public function testSqlException() {
     $this->expectException(DatabaseExceptionWrapper::class);
-    $this->expectExceptionMessageRegExp('/^Exception in Test filters\[test_filter\]:/');
+    $this->expectExceptionMessageMatches('/^Exception in Test filters\[test_filter\]:/');
 

#5 IMHO it would be better to silence the warnings by adding the relevant string in the PHPUnit8Warnings trait, and then file a follow-up to do the conversions as part of #3110543: [meta] Support PHPUnit 9 in Drupal 9

jungle’s picture

Doubt there are unexpected changes to composer.lock file in #2. Let CI prove it.

    container_command:
        commands:
          - "cp composer.lock composer.lock.jungle"
          - "composer update"
          - "diff composer.lock composer.lock.jungle"
          - "diff composer.lock composer.lock.longwave"
          - "composer --version"

In the patch

  1. composer.lock is from my local
  2. composer.lock.longwave is from #2

Expected outputs:

  1. "diff composer.lock composer.lock.jungle": empty
  2. "diff composer.lock composer.lock.longwave": non empty
jungle’s picture

21:27:12 > Drupal\Composer\Composer::generateMetapackages
21:27:13 diff composer.lock composer.lock.jungle
21:27:13 diff composer.lock composer.lock.longwave
21:27:13 185a186,195
21:27:13 >             "funding": [
21:27:13 >                 {
21:27:13 >                     "url": "https://packagist.com",
21:27:13 >                     "type": "custom"
21:27:13 >                 },
21:27:13 >                 {
21:27:13 >                     "url": "https://tidelift.com/funding/github/packagist/composer/composer",
21:27:13 >                     "type": "tidelift"
21:27:13 >                 }
21:27:13 >             ],
21:27:13 464c474
21:27:13 <                 "reference": "e3d324da27c1060f5f9982ee20aa7f9845303fd2"
21:27:13 ---
21:27:13 >                 "reference": "5bd6798a64831fa08a343a14a0ee47127c4cb99f"
21:27:13 700c710,713
21:27:13 <             "description": "Drupal is an open source content management platform powering millions of websites and applications."
21:27:13 ---
21:27:13 >             "description": "Drupal is an open source content management platform powering millions of websites and applications.",
21:27:13 >             "transport-options": {
21:27:13 >                 "relative": true
21:27:13 >             }
21:27:13 708c721
21:27:13 <                 "reference": "0691ca6beba657e6da57a893b1c6da757d16afc8"
21:27:13 ---
21:27:13 >                 "reference": "8269af3aecda0bd2b71fb4bec770774d232db211"
21:27:13 730c743,746
21:27:13 <             ]
21:27:13 ---
21:27:13 >             ],
21:27:13 >             "transport-options": {
21:27:13 >                 "relative": true
21:27:13 >             }
21:27:13 738c754
21:27:13 <                 "reference": "0b015340af38f90df46923a934d0b22026134f18"
21:27:13 ---
21:27:13 >                 "reference": "888d3dec46af4b05eeae83a7a8fd2fd43d9e54ab"
21:27:13 760c776,779
21:27:13 <             ]
21:27:13 ---
21:27:13 >             ],
21:27:13 >             "transport-options": {
21:27:13 >                 "relative": true
21:27:13 >             }
21:27:13 1308a1328,1333
21:27:13 >             "funding": [
21:27:13 >                 {
21:27:13 >                     "url": "https://funding.communitybridge.org/projects/laminas-project",
21:27:13 >                     "type": "community_bridge"
21:27:13 >                 }
21:27:13 >             ],
21:27:13 3977a4003,4012
21:27:13 >             "funding": [
21:27:13 >                 {
21:27:13 >                     "url": "https://packagist.com",
21:27:13 >                     "type": "custom"
21:27:13 >                 },
21:27:13 >                 {
21:27:13 >                     "url": "https://tidelift.com/funding/github/packagist/composer/composer",
21:27:13 >                     "type": "tidelift"
21:27:13 >                 }
21:27:13 >             ],
21:27:13 4020a4056,4058
21:27:13 >             "bin": [
21:27:13 >                 "bin/composer"
21:27:13 >             ],
21:27:13 4158a4197,4202
21:27:13 >             "funding": [
21:27:13 >                 {
21:27:13 >                     "url": "https://packagist.com",
21:27:13 >                     "type": "custom"
21:27:13 >                 }
21:27:13 >             ],
21:27:13 6503c6547,6548
21:27:13 <     "platform-dev": []
21:27:13 ---
21:27:13 >     "platform-dev": [],
21:27:13 >     "plugin-api-version": "1.1.0"
21:27:13 composer --version
21:27:13 Composer version 1.9.3 2020-02-04 12:58:49

IMO, the output from CI proved there are unexpected changes to composer.lock, see https://dispatcher.drupalci.org/job/drupal_patches/42057/console

jungle’s picture

longwave’s picture

I used Composer 1.10.5 to do the update, that probably explains the differences. We specify 1.10.5 in the lock file as well so I think updates should be done with the same version?

jungle’s picture

21:27:13 185a186,195
21:27:13 >             "funding": [
21:27:13 >                 {
21:27:13 >                     "url": "https://packagist.com",
21:27:13 >                     "type": "custom"
21:27:13 >                 },
21:27:13 >                 {
21:27:13 >                     "url": "https://tidelift.com/funding/github/packagist/composer/composer",
21:27:13 >                     "type": "tidelift"
21:27:13 >                 }
21:27:13 >             ],

All differences point to funding/tidelift. Not a user of it/No idea what is it. Is it a custom composer repository you are using?

jungle’s picture

$ composer --version
Composer version 1.9.0 2019-08-02 20:55:32

On my local it's 1.9.0, inside the CI/Container, it's Composer version 1.9.3 2020-02-04 12:58:49

catch’s picture

The latest version of composer adds funding information to composer.lock, not sure when it was introduced.

We might want a separate issue to update composer.lock for the funding changes, so that it doesn't affect other patches in the queue?

jungle’s picture

Composer 1.10: composer fund, https://blog.packagist.com/composer-fund/

Make sense now, it's a new feature introduced at Composer 1.10.

jungle’s picture

@greg.1.anderson
Yeah, I downgraded my Composer to 1.9.0 so that I could keep making lock files that didn't have extra info. A separate issue to get this in would be a good idea. Or we could do it as part of the existing Composer 1.10 support issue.
https://www.drupal.org/project/drupal/issues/3116405

Comment from @greg.1.anderson on slack

jungle’s picture

A separate issue created to add funding info in composer.lock (3127918)

longwave’s picture

FileSize
22.65 KB
3.97 KB

Downgraded to Composer 1.9 and I get the same results as #9. We also no longer need the composer lock hash calculation changes, and I have also implemented the suggestion in #6 as I now agree that fixing the tests here is technically out of scope.

jungle’s picture

3121885 updated coder module targeting 8.9.x, if it gets ported to 9.0.x, then here needs a reroll probably.

Status: Needs review » Needs work

The last submitted patch, 17: 3127674-16.patch, failed testing. View results

jungle’s picture

Status: Needs work » Needs review
FileSize
23.51 KB
852 bytes

Fix warning

1) Drupal\Tests\Component\Serialization\YamlTest::testObjectSupportDisabledSymfony
expectExceptionMessageRegExp() is deprecated in PHPUnit 8 and will be removed in PHPUnit 9.
longwave’s picture

Why isn't the warning in #20 caught by the PHPUnit8Warnings trait?

edit: I see, it's a Component and the test directly extends TestCase, and as the components are supposed to be standalone we can't include PHPUnit8Warnings here.

mondrake’s picture

#21 because that's a test for a component, that's likely extending from PHPUnit's TestCase directly, so the trait is not used... IMHO it's better use the trait for now, so that we can orderly remove the deprecated call later

edit - xposted

mondrake’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

I suppose this needs a reroll now.

piyuesh23’s picture

Issue tags: +DIACWApril2020
imalabya’s picture

Assigned: Unassigned » imalabya
imalabya’s picture

Status: Needs work » Needs review
FileSize
23.58 KB

Rerolled the patch.

imalabya’s picture

Assigned: imalabya » Unassigned
mondrake’s picture

Status: Needs review » Needs work
Issue tags: -Needs reroll
+++ b/core/tests/Drupal/Tests/Traits/PHPUnit8Warnings.php
@@ -26,6 +26,8 @@ trait PHPUnit8Warnings {
+    'assertAttributeInstanceOf() is deprecated and will be removed in PHPUnit 9.',

This was removed in HEAD and is being added back, should be removed.

imalabya’s picture

Status: Needs work » Needs review
FileSize
23.5 KB

Updated the patch.

mondrake’s picture

Status: Needs review » Reviewed & tested by the community

LGTM. Adds a PHPUnit8 deprecation warning silencer that was missing up to PHPUnit 8.5.2, that we are going to need to work on PHPUnit9 support.

mondrake’s picture

mondrake’s picture

Status: Reviewed & tested by the community » Needs work

Uh-oh. Looks like we need a separate patch for 9.1.x

jungle’s picture

Status: Needs work » Needs review
FileSize
27.2 KB

A patch for 9.1.x, the patch for 9.0.x is in #29

jungle’s picture

FileSize
27.14 KB

Re-roll again the patch for 9.1.x due to a new commit ~40 mins ago from the upstream.

jungle’s picture

Assigned: Unassigned » jungle
Issue tags: +Needs reroll
jungle’s picture

jungle’s picture

Changes of the 9.0.x patch in #36

$ composer-lock-diff --no-links
+--------------------------------------+--------+--------+
| Production Changes                   | From   | To     |
+--------------------------------------+--------+--------+
| composer/installers                  | v1.8.0 | v1.9.0 |
| doctrine/annotations                 | v1.8.0 | 1.10.1 |
| doctrine/reflection                  | v1.1.0 | 1.2.1  |
| guzzlehttp/guzzle                    | 6.5.2  | 6.5.3  |
| laminas/laminas-diactoros            | 2.2.2  | 2.2.3  |
| laminas/laminas-feed                 | 2.12.0 | 2.12.2 |
| laminas/laminas-zendframework-bridge | 1.0.1  | 1.0.3  |
| psr/log                              | 1.1.2  | 1.1.3  |
| symfony-cmf/routing                  | 2.1.1  | 2.2.0  |
+--------------------------------------+--------+--------+

+---------------------------+--------+--------+
| Dev Changes               | From   | To     |
+---------------------------+--------+--------+
| composer/ca-bundle        | 1.2.6  | 1.2.7  |
| composer/composer         | 1.10.0 | 1.10.5 |
| phpunit/phpunit           | 8.5.2  | 8.5.3  |
| squizlabs/php_codesniffer | 3.5.4  | 3.5.5  |
| webmozart/assert          | 1.7.0  | 1.8.0  |
+---------------------------+--------+--------+

Changes of the 9.1.x patch in #36

$  composer-lock-diff --no-links
+--------------------------------------+--------+--------+
| Production Changes                   | From   | To     |
+--------------------------------------+--------+--------+
| composer/installers                  | v1.8.0 | v1.9.0 |
| doctrine/annotations                 | v1.8.0 | 1.10.1 |
| doctrine/reflection                  | v1.1.0 | 1.2.1  |
| guzzlehttp/guzzle                    | 6.5.2  | 6.5.3  |
| laminas/laminas-diactoros            | 2.2.2  | 2.2.3  |
| laminas/laminas-feed                 | 2.12.0 | 2.12.2 |
| laminas/laminas-zendframework-bridge | 1.0.1  | 1.0.3  |
| psr/log                              | 1.1.2  | 1.1.3  |
| symfony-cmf/routing                  | 2.1.1  | 2.2.0  |
+--------------------------------------+--------+--------+

+---------------------------+--------+--------+
| Dev Changes               | From   | To     |
+---------------------------+--------+--------+
| composer/ca-bundle        | 1.2.6  | 1.2.7  |
| composer/composer         | 1.10.0 | 1.10.5 |
| phpunit/phpunit           | 8.5.2  | 8.5.3  |
| squizlabs/php_codesniffer | 3.5.4  | 3.5.5  |
| webmozart/assert          | 1.7.0  | 1.8.0  |
+---------------------------+--------+--------+

mondrake’s picture

Status: Needs review » Reviewed & tested by the community

Thank you for the rerolls.

  • catch committed 3cfe353 on 9.1.x
    Issue #3127674 by jungle, longwave, imalabya, mondrake: Update...

  • catch committed 6b141f0 on 9.0.x
    Issue #3127674 by jungle, longwave, imalabya, mondrake: Update...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 9.1.x and also to 9.0.x, thanks!

Status: Fixed » Closed (fixed)

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

xjm’s picture

Status: Closed (fixed) » Needs work
Issue tags: +9.0.0 release notes, +Needs release note

Needs a more helpful release note.

xjm’s picture

xjm’s picture

Status: Needs work » Fixed
Issue tags: -9.0.0 release notes, -Needs release note

I merged the release notes for this into #3133442: Update dependencies for Drupal 9.0.

Status: Fixed » Closed (fixed)

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