Problem/Motivation
We skip a number of deprecations in .deprecation-ignore.txt but some of these are outdated or could be tightened up.
For example:
%The "Symfony\\Component\\Validator\\Context\\ExecutionContextInterface::.*\(\)" method is considered internal Used by the validator engine\. (Should not be called by user\W+code\. )?It may change without further notice\. You should not extend it from "[^"]+"\.%
This doesn't seem to trigger any more.
%Method "Twig\\NodeVisitor\\NodeVisitorInterface::[^"]+" might add "[^"]+" as a native return type declaration in the future. Do the same in (child class|implementation) "[^"]+" now to avoid errors or add an explicit @return annotation to suppress this message%
Any implementation in contrib would also skip this deprecation - but we want contrib to add return types now, so core can add them in the future when Twig also does. We can tighten this up so it only triggers on the core implementation.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Comments
Comment #3
longwaveI was wrong about
Select::hasAllTags()and friends, but we can tighten up many of the other skips and remove a few - two where our implementations have been removed and one where we don't need to use a custom stub in a test.Comment #4
longwaveComment #5
longwaveNotes for reviewers are in the MR.
Comment #6
longwaveComment #7
mondrakeThis tells me it would be great to find a way to report ignored deprecations that are no longer necessary… like PHPStan does. Will be hard though as PHPUnit tests are run in parallel jobs in Drupal and results would need some sort of consolidation.
Comment #8
mondrakeComment #9
mondrakeOh my... entered comment in the issue tags field...
Couple of nits inline, NW just to have a look
Comment #10
longwaveThanks for reviewing. I split out the PHPUnit one but think we should leave DrupalSelenium2Driver for now.
Comment #11
mondrakeSeems all good to me, we are narrowing the ignores so FTW.
Comment #12
longwaveThanks again - let's try to get this into 11.2 so contrib actually finds out about some of these that may have previously been skipped.
Comment #13
mondrakeFiled #3523614: [CI] Refactor DeprecationHandler in a standard PHPUnit extension, and collect deprecation statistics to explore #7.
Comment #14
quietone commentedEverything looks in order here and the followup was made to find a better way. I read the MR and the changes look correct to me as well.
Comment #17
larowlanCommitted to 11.x and backported to 11.2.x thanks folks