[meta] Remove or tighten deprecation skips

Created on 8 May 2025, 4 days ago

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 following deprecation is listed for Twig 2 compatibility when unit
# testing using \Symfony\Component\ErrorHandler\DebugClassLoader.
%The "Twig\\Template" class is considered internal\. It may change without further notice\. You should not use it from "Drupal\\Tests\\Core\\Template\\StubTwigTemplate"\.%
%The "Twig\\Environment::getTemplateClass\(\)" method is considered internal\. It may change without further notice\. You should not extend it from "Drupal\\Core\\Template\\TwigEnvironment"\.%

This mentions Twig 2 but we are on Twig 3 now.

%The "Drupal\\Core\\Database\\Query\\Select::hasAllTags\(\)" method will require a new "string \.\.\. \$tags" argument in the next major version of its interface%
%The "Drupal\\Core\\Database\\Query\\Select::hasAnyTag\(\)" method will require a new "string \.\.\. \$tags" argument in the next major version of its interface%

While this is ignored I think all downstream users will also ignore it - but we want them to add the argument now, so in the future we can add it to the interface as well. Perhaps this needs to be more tightly specified so only core gets skipped?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

๐ŸŒฑ Plan
Status

Active

Version

11.0 ๐Ÿ”ฅ

Component

base system

Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom longwave UK

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @longwave
  • Merge request !12076Remove some skips. โ†’ (Open) created by longwave
  • Pipeline finished with Failed
    4 days ago
    Total: 95s
    #492289
  • Pipeline finished with Failed
    4 days ago
    Total: 206s
    #492400
  • Pipeline finished with Failed
    4 days ago
    #492402
  • Pipeline finished with Failed
    4 days ago
    Total: 111s
    #492414
  • Pipeline finished with Failed
    4 days ago
    #492430
  • Pipeline finished with Failed
    4 days ago
    Total: 437s
    #492504
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom longwave UK

    I 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.

  • Pipeline finished with Failed
    4 days ago
    Total: 451s
    #492512
  • Pipeline finished with Failed
    4 days ago
    Total: 331s
    #492521
  • Pipeline finished with Failed
    4 days ago
    Total: 340s
    #492528
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom longwave UK
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom longwave UK

    Notes for reviewers are in the MR.

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom longwave UK
  • Pipeline finished with Success
    4 days ago
    Total: 540s
    #492543
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly mondrake ๐Ÿ‡ฎ๐Ÿ‡น

    This 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.

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly mondrake ๐Ÿ‡ฎ๐Ÿ‡น
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly mondrake ๐Ÿ‡ฎ๐Ÿ‡น

    Oh my... entered comment in the issue tags field...

    Couple of nits inline, NW just to have a look

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom longwave UK

    Thanks for reviewing. I split out the PHPUnit one but think we should leave DrupalSelenium2Driver for now.

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly mondrake ๐Ÿ‡ฎ๐Ÿ‡น

    Seems all good to me, we are narrowing the ignores so FTW.

  • Pipeline finished with Success
    3 days ago
    Total: 385s
    #493047
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom longwave UK

    Thanks 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.

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly mondrake ๐Ÿ‡ฎ๐Ÿ‡น

    Filed โœจ Report usage of deprecation ignores during test runs Active to explore #7.

Production build 0.71.5 2024