Problem/Motivation
Drupal core now uses a minimum PHPUnit version of 6.5. We should remove the class aliasing layer which allowed us to have BC for PHPUnit 4.
Proposed resolution
Remove BC PHPUnit class aliasing. Adopt PHPUnit 6.5 as our baseline.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | interdiff-13-15.txt | 700 bytes | spokje |
| #15 | 3063182-15.patch | 4.47 KB | spokje |
Comments
Comment #2
mile23You know, I thought we already removed a bunch of the PHPUnit aliasing stuff, but I guess we didn't.
It turns out that we still need a follow-up to remove the BC aliasing code from core as a follow-up to #3060391: Cleanup usage of PHPUnit 4.8 aliased classes
So I'll rescope here.
But I definitely want to keep this one detail:
Experimentation in #3039344-30: Use Symfony's simple-phpunit shows us that PHPUnit\Framework\BaseTestListener is deprecated in PHPUnit 6.4.
Comment #3
mile23Comment #4
wim leersIs this what we want here?
(I am not at all familiar with all this, but in reviewing #3060391: Cleanup usage of PHPUnit 4.8 aliased classes prior to commit and it just having gotten committed, I think I understand what this is trying to do :D)
Comment #5
mondrake#4 basically, yes :)
It will fail now (hopefully) because we added a test to check that the aliased classes exist, https://git.drupalcode.org/project/drupal/commit/50a6a9e#95ea60225f15fb0...
It's an open discussion whether to do this early of wait for D9.
Comment #6
mondrake:( patch apply failures no longer set automatically issues to NW
Comment #7
wim leersRerolled and addressed #5.
Comment #9
catchTest fail looks unrelated so I'm retesting.
Comment #10
wim leersCame back green this time :)
Comment #12
mondrakeComment #13
spokjeRe-rollin', re-rollin', re-rollin'
Though the streams are swollen
Keep them patches re-rollin', rawhide
.
..
...
Erm...right...
Reroll of patch in #7
Comment #14
mondrakeThere are now some
usestatements in bootstrap.php that are no longer used.Comment #15
spokjeRight...less lyrics quoting, more Coding Standard awareness...
Addressed #14
Comment #16
mondrakeThere are still a couple places where we can find old school PHPUnit class names:
core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php
core/tests/Drupal/Tests/Core/Test/fixtures/phpunit_error.xml
not sure what to do with those
Comment #17
spokje@mondrake
This looks like a simple copy of the Doctrine Test in https://github.com/doctrine/annotations/commit/01ddf2cfa8aaf08d1f22d5354...
Looks to me like the actual class
PHPUnit_Framework_TestCaseisn't used, only the annotation for it.This looks like a test-resource for
\Drupal\Tests\Core\Test\JUnitConverterTestwhich simply tests if this XML-file is parsed correctly usingJUnitConverter::xmlToRows.Looks to me like the actual old-skool classes
PHPUnit_Framework_Error_NoticeandPHPUnit_Framework_ExpectationFailedExceptionare not used in anyway, other than needing a test-failure to parse.I feel like the first should stay as-is, since we want the Doctrine-clone staying as close as possible.
The second one can, IMHO, opinion be replaced by any other Exception, Not sure if that's worth the effort though.
Comment #18
mondrake#17 ok.
This issue quotes a masterpiece song brought to fame by a couple of dark-suited guys, and, by the way, removes all the cruft related to PHPUnit 4. RTBC.
Proud Mary by CCR would also be worth quoting, but that definitely merits an issue of its own.
Comment #19
spokje@mondrake *grin*
The next time a patch from me is a "Hail Mary" attempt, (so basically any patch from me) I'll certainly keep that in mind.
Comment #21
spokjeBack to RTBC after random TestBot failure.
Comment #23
catchCommitted 0cc1a13 and pushed to 9.0.x. Thanks!