Closed (fixed)
Project:
Drupal core
Version:
main
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
2 Mar 2026 at 15:55 UTC
Updated:
26 Mar 2026 at 20:55 UTC
Jump to comment: Most recent
We skip a number of deprecations in .deprecation-ignore.txt but some of these are outdated or could be tightened up.
Also, there's a number of tests that are tagged with the #[IgnoreDeprecations] attribute, but no deprecations are actually triggered during the test execution.
.deprecation-ignore.txt#[IgnoreDeprecations] from tests that do not trigger deprecations@phpstan-ignore annotations to prevent PHPStan errors in code that by removing #[IgnoreDeprecations] is no longer resolved as deprecated scopeStart 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:
Comments
Comment #4
mondrakeThe stats to support the cleanup are coming from the WIP #3523614: [CI] Collect and report deprecation statistics and details.
Comment #5
mondrakeComment #6
mondrakeComment #7
mondrakeUpdated IS
Comment #8
dcam commentedI reviewed the changes and didn't find anything to comment on. So I did my own check to see if there were additional tests from which we can remove
#[IgnoreDeprecations]. I found the following 6 files:DatetimeElementFormTestalready has one removal, but removing the other one didn't cause a problem.I'm guessing these weren't simply missed by earlier checks. Probably they were made possible by recent deprecation removal commits. Four of those relate to Core libraries. I know we had one or two patches land that affected those classes in the last few days.
I'm setting the status to Needs Work so my findings can be double-checked and possibly added to the MR.
Comment #9
mondrake#8 thanks! Yes, done. BTW it was also confirmed rebasing #3523614: [CI] Collect and report deprecation statistics and details and getting fresh stats https://git.drupalcode.org/issue/drupal-3523614/-/jobs/8787171, which is a good sign that one is doing its job
Comment #10
mondrakeReverted last commit, it was driven by false negatives in #3523614: [CI] Collect and report deprecation statistics and details
Comment #11
smustgrave commentedThis one needs a rebase, imagine when your testing framework cleanup ticket lands too so not sure if you want to wait?
Comment #12
mondrakeThis is not hard to reroll; thanks for asking. Rebased
Comment #13
mondrakeOops sorry it wasn't RTBC
Comment #14
smustgrave commentedif you don't mind then I don't mind marking. Seems like a good chunk.
Comment #15
catchOne question on the MR.
Comment #16
mondrakeWell, I think we came across a misconcept here, courtesy of #3523614: [CI] Collect and report deprecation statistics and details.
If the purpose of the test is, per doc,
then we are not expecting deprecations here. And in fact there is no deprecation expectation in the test. That means it's right to remove the attribute, that prevents tests to fail if deprecations are triggered. And in fact the referenced issue shows that none occur.
Comment #18
catchOh I see what you mean. The wording is essentially the opposite of what the attribute does, I think I was mentally adding 'doesn't cause a test failure' to the end of the sentence.
Committed/pushed to main, thanks!