Problem/Motivation
PHPUnit 9 deprecated ::expectError*() and ::expectWarning*()methods. They're removed from PHPUnit 10.
Proposed resolution
- Deprecate passing
TrustedCallbackInterface::TRIGGER_WARNINGfor$error_typeinDoTrustedCallbackTrait::doTrustedCallback()in 10.3 - Remove the feature and the interface constant in D11
Issue fork drupal-3427178
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:
- 3427178-11.x
changes, plain diff MR !7399
- 3427178-replace-calls-to
changes, plain diff MR !7011
Comments
Comment #2
mondrakeWorking on this.
Comment #4
mondrakeMR!7011 is for 10.3.x. Once we confirm this is the way to go, I'd add a D11 branch for the removal, à la #3427173: Replace calls to :::expectWarning*() in Drupal\Tests\Component\PhpStorage\FileStorageTest.
Comment #5
smustgrave commentedChange looks fine to me. Do you want to open the 11.x branch also?
Comment #6
mondrakeI think this should wait until we have found a direction for #3427173: Replace calls to :::expectWarning*() in Drupal\Tests\Component\PhpStorage\FileStorageTest.
Comment #7
mondrakeComment #8
smustgrave commentedSounds good postponing on #3427173: Replace calls to :::expectWarning*() in Drupal\Tests\Component\PhpStorage\FileStorageTest
Comment #9
longwaveI think we should go ahead and deprecate TRIGGER_WARNING. As far as I can see it was never used in core (except for the test coverage) and can't find any uses in contrib.
Comment #11
longwaveMR!7011 for 10.3.x and MR!7399 for 11.x
Comment #12
smustgrave commentedRemoval seems fine, all green.
Comment #15
catchCommited/pushed to 11.x and 10.3.x respectively, thanks!
Comment #16
quietone commentedThere is a change record for this issue that consists of "@tbd"
Comment #17
catchWhoops. I updated the CR with how to handle the deprecation.