Closed (fixed)
Project:
Drupal core
Version:
8.9.x-dev
Component:
phpunit
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
22 Jan 2020 at 12:05 UTC
Updated:
18 May 2020 at 17:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mondrakeComment #3
mondrakeComment #4
mondrakeComment #5
longwaveI know we already ship with latest PHPUnit but we should technically depend on
^7.5as the replacements for assertInternalType() weren't introduced until then. This is irrelevant when #3063887: Support PHPUnit 8 in Drupal 9, drop support for PHPUnit 7 lands though :)Comment #6
longwaveSo PHPUnit 8 is in, this can go in too.
Comment #7
mondrakeNeeds a reroll
Comment #8
ravi.shankar commentedHere I have added a re-roll of patch #2.
Comment #9
mondrakeBack to RTBC, thanks
Comment #10
alexpottSo this is prepping us for PHPUnit 9. I think this is okay for us to land in Drupal 9.0.x but I think that we need to come up with a plan for how and when we're going to adopt PHPUnit 9. Drupal 9 is on a supported version of PHPUnit for now and while it would be great to be even more future proof by being on PHPUnit 9 it is disruptive and contrary to how aim of making it simpler to support Drupal 8.8.x,8.9.x and 9.0.x at the same time.
Can we collect all the PHPUnit 9 issues into a meta and coordinate which are not disruptive now and which are. For example #3113509: Replace @expectedException* annotations with dedicated methods was safe to do now.
Comment #11
mondrakeComment #12
mondrake@alexpott re #10 see a proposal to reduce disruption in #3110543-35: [meta] Support PHPUnit 9 in Drupal 9.
Comment #13
longwaveThese were added in PHPUnit 7.5 so again if we are to backport this then we need a forward-compatibility shim.
Comment #14
alexpottCommitted and pushed 221b7aed06 to 9.1.x and 824ef2ea66 to 9.0.x. Thanks!
I rerolled this on commit and fixed the conflict in core/tests/Drupal/Tests/Traits/PHPUnit8Warnings.php
Backported to 9.0.x as this is analogous to #3126333: Replace usage of the optional $canonicalize parameter of assertEquals(), that is deprecated and opened #3126787: [D8 only] Add forwards-compatibility shim for assertInternalType() replacements in phpunit 6&7 for D8... following @catch's pattern
Comment #18
longwaveRerolled for 8.9.x now #3126787: [D8 only] Add forwards-compatibility shim for assertInternalType() replacements in phpunit 6&7 is in. There are a number of other assertInternalType() calls in 8.9.x but I don't see the point in replacing these; PHPUnit 9 will never run on 8.9.x.
Comment #19
mondrakeI think here it’s OK to just backport the conversions done for D9.
Comment #21
xjmThe backport looks good to me to. Committed to 8.9.x. Thanks!