Problem/Motivation
Follow up of #3523383: Tidy up and tighten deprecation skips.
The DeprecationHandler class was implemented as a replacement of Symfony's PHPUnit-bridge component, and uses initialization logic that is now outdated by more recent PHPUnit developments.
Proposed resolution
In this issue, we will
convert the DeprecationHandler class into a proper PHPUnit 'extension', using the bootstrap logic introduced in PHPUnit 10introduce proper extension parameters in the phpunit.xml to configure the extension, and a new environment variable that could override the xml configuration at runtime in CI pipelinesmake the legacySYMFONY_DEPRECATION_HELPERvariable redundant (still allowing its usage at least for now)- introduce a mechanism to report on each CI job, and finally consolidate at the end of a pipeline execution, statistics about: a) are the deprecation ignore patterns in the
.deprecation-ignore.txtfile actually necessary and b) are tests marked with the#[IgnoreDeprecations]attribute actually triggering any deprecation. So that with those information we can cleanup tests from irrelevant settings (that could also silently ignore other unexpected deprecations).
DONE:
Remaining tasks
Postponed on #3574681: Introduce support for PHPUnit 13.5
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3523614
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:
- 3523614-report-usage-of
changes, plain diff MR !12092
- 3523614-consolidate
changes, plain diff MR !14927
Comments
Comment #2
mondrakeComment #4
mondrakePOC works, see the output at the end of run-tests.sh execution... I "just" need to find a way to consolidate results across different jobs to have a single overall stats board.
Comment #5
mondrakeComment #6
mondrakeComment #7
mondrakeComment #8
quietone commentedJust a little issue maintenance. Adding what this is postponed on to the remaining tasks per Remining tasks.
Comment #9
mondrakeComment #10
mondrakeComment #11
mondrakeComment #12
mondrakepostponed on #3497124: Deprecate expectDeprecation(), use PHPUnit's expectUserDeprecationMessage*() instead
Comment #13
mondrakeComment #15
mondrakeComment #18
mondrakeComment #19
mondrakeComment #20
mondrakeComment #21
mondrakeComment #22
mondrakeComment #23
mondrakeLet's spin off the first 3 point from the IS into an issue of its own.
Comment #24
mondrakeComment #25
mondrakeComment #26
mondrakeComment #27
mondrakeComment #28
mondrakeComment #29
quietone commentedWork done by longwave identified this issue as one where all the blockers were closed. Reading the comments here I don't see what this is postponed on, so I am setting to active.
Comment #30
mondrakePHPUnit 13 changes completely how deprecations are collected and reported, so I’d suggest to postpone on #3574681: Introduce support for PHPUnit 13.5.
Comment #31
quietone commentedAdding what this is postponed on to the issue summary