Problem/Motivation
New PHPUnit version 9.5.12 released just now (2022-01-21, see here: https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md) throws a new, unhandled deprecation notice:
Remaining direct deprecation notices (1)
1x: The "Drupal\Tests\Listeners\DrupalListener" class implements "PHPUnit\Framework\TestListener" that is deprecated.
1x in DrupalListener::endTest from Drupal\Tests\Listeners
This causes a lot of existing tests to fail. (See for example: https://www.drupal.org/pift-ci-job/2300826)
Looking here: https://dispatcher.drupalci.org/job/drupal_patches/, it seems there has been no successful build without deprecation notices since #110382
, which in my time zone was handled at 21-Jan-2022 05:28:32.
After that build even a testrun with no errors seems to end up with 3,766 failures, which are all the above deprecation notice.
Steps to reproduce
Run a full test run on existing Drupal 9.x and see previously passing tests fail.
Proposed resolution
- Unsure if this is an upstream issue
- To prevent massive test-failures until Big Brains sought that out, we can skip the deprecation notice. This is implemented in MR!1694)
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#19 | 3259744-19.patch | 1.41 KB | PCate |
#16 | 3259744-16.patch | 1.11 KB | casey |
Issue fork drupal-3259744
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3259744-phpunit-9.5.12-released changes, plain diff MR !1694
Comments
Comment #3
SpokjeComment #4
SpokjeComment #5
SpokjeComment #6
mondrakeThis is the culprit upstream I think: https://github.com/sebastianbergmann/phpunit/commit/9b5a2e5cc9d615ab9b14...
The fix is OK, there's no other way round I think, thanks @Spokje
Comment #7
longwaveThank you @Spokje. From the TestListener docblock:
We have to skip the deprecation until we have upgraded to PHPUnit 10, so this is the correct solution for now.
Comment #8
mondrakeCritical, all testing on D9 and PHP >= 7.3 must be broken ATM
EDIT - xpost with #7
Comment #9
alexpottCommitted 654b490 and pushed to 10.0.x. Thanks!
Committed f5dc2cb and pushed to 9.4.x. Thanks!
Committed faec13d and pushed to 9.3.x. Thanks!
Well that was fun this MR conflicted with 10.x and 9.3.x :D
Comment #13
Wim LeersWow, I was just about to start looking for what the hell is going on and then I found it was fixed a minute ago, here, in this issue — this was leading to mysterious failures in #3248177-25: Language toolbar item cannot be removed from the toolbar 😄
Thanks for the super fast fix! 👏
Comment #14
SpokjeWe aim to please...
...and slightly annoy core committers ;)
Comment #16
casey CreditAttribution: casey at SWIS commentedFixed patch for usage with composer-patches on 9.3.3 installations
Comment #17
xjmCan we get a 9.2.x version of this? It did not cherry-pick cleanly. We need to be able to have passing test runs on 9.2.x since it receives security coverage. :) Thanks!
Comment #18
xjmComment #19
PCate CreditAttribution: PCate commentedHere's (hopefully) a 9.2.12 compatible version of the patch.
Comment #20
SpokjeLGTM, RTBC if TestBot returns green.
Comment #22
xjmThanks @PCate!