Problem/Motivation
Simpletest and its UI is no longer used. However we still have a class at \Drupal\Tests\Listeners\SimpletestUiPrinter that turns URLs into clickable links.
PHPUnit 10 removes the —printer command line option: https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-10.0.md
Steps to reproduce
Proposed resolution
Remove the class, it’s essentially dead code.
Remaining tasks
Figure out if we still need this.
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | interdiff_11-14.txt | 1.81 KB | mondrake |
| #14 | 3254723-14.patch | 3.82 KB | mondrake |
Comments
Comment #2
longwaveComment #3
mondrakeI’d go for removal. See also #3217904-33: [meta] Support PHPUnit 10 in Drupal 11.
Comment #4
murilohp commentedI agree with @mondrake, the following patch removes the class.
If we need to remove any other class please let me know.
Thanks!
Comment #5
mondrakeI am afraid it won’t work… there is code that is using that class. BTW there’s zero test coverage of this, I wonder if we can have some.
Comment #6
mondrakeworking on a test
Comment #8
mondrakeHere's a test that can be included in next patch to ensure we do not break anything.
Comment #9
mondrakeSorry, please disregard the patch in #7.
Comment #10
mondrakeHere's a full patch.
Comment #11
mondrakeComment #12
murilohp commentedHey @mondrake, thanks a lot for your help! At the begging I thought it could be an easy fix, but after the tests of #4, I realized that this could be harder, I reviewed the patch #11 and it looks good to me, I'll not move this to RTBC right now because I think we should wait for someone else's review.
For me it's +1 for RTBC.
Thanks!
Comment #13
mondrakeComment #14
mondrakeCouple glitches:
writemethodComment #15
longwaveLooks great to me.
As a kind of next step I wonder if we could refactor HtmlOutputPrinterTrait into HtmlOutputPrinter, we don't really need a trait here - I think this was for cross-version compatibility at some point.
Comment #16
mondrakeNot sure it's worth at this point, in PHPUnit 10 all this has to be rewitten anyway.
Comment #17
mondrakeComment #19
mondrakerandom test failure
Comment #21
catchCommitted b5c3f1b and pushed to 10.0.x. Thanks!