Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
In #2935755: Add a trait to allow dynamic setting of expected deprecations we've tried to introduce expectDeprecation()
for tests but it does not work for Kernel tests or Browser tests because they are run in isolated mode.
Proposed resolution
Fix it so it does and so we can use it in #2936704: Remove REST route deprecations from DeprecationListenerTrait::getSkippedDeprecations(), use ExpectDeprecationTrait::expectDeprecation() instead
Remaining tasks
User interface changes
None
API changes
to be decided
Data model changes
None
Comment | File | Size | Author |
---|---|---|---|
#10 | 2936802-10.patch | 9.81 KB | alexpott |
#10 | 3-10-interdiff.txt | 1.37 KB | alexpott |
#3 | 2936802-2.patch | 9.58 KB | Wim Leers |
#3 | 2936802-2-test-only-FAIL.patch | 794 bytes | Wim Leers |
Comments
Comment #2
alexpottComment #3
Wim LeersNo remarks for #2, except that we need a failing test-only patch. So, extracted that from the patch in #2, and also reuploaded #2.
Ran locally, confirmed the test-only patch fails, the other one passes, so pre-emptively RTBC'ing.
Comment #4
Wim LeersNote this blocks #2936704: Remove REST route deprecations from DeprecationListenerTrait::getSkippedDeprecations(), use ExpectDeprecationTrait::expectDeprecation() instead.
Comment #5
Wim LeersComment #7
Wim Leers🎉
Comment #9
larowlanis this comment still valid?
Comment #10
alexpottAh yes I meant to add a comment there. And whilst adding the comment I realised we had not tested both sides of the if in the code below - ie. writing the first expected deprecation to a file and then another.
Comment #11
Wim Leers#9: Can't believe I did not see that :(
#10: wow, I did not realize you could test multiple deprecations in one test, great!
Comment #12
dawehnerwow
\PHPUnit_Framework_TestCase::setRunTestInSeparateProcess
is pretty sadOfftopic: Do we have an upstream issue to allow us to do that in a nice way?
Comment #13
Wim Leershttps://github.com/symfony/symfony/pull/25757
Comment #14
larowlanCommitted 6a3ba02 and pushed to 8.6.x
Can cherry-pick after the alpha
Comment #17
alexpottPatch was committed to 8.6.x moving issue back to 8.5.x
Comment #18
larowlanCherry picked as 9414fb5 and pushed to 8.5.x.