[policy, no patch] Target any 11.x API/disruptive deprecations for removal in 13.x

Created on 29 May 2024, 5 months ago
Updated 31 May 2024, 5 months ago

Problem/Motivation

Opening this following a discussion with @berdir, @xjm, @bbrala, @japerry in slack.

Original slack discussion here: https://drupal.slack.com/archives/C03L6441E1W/p1716842930248339

For the 10-11 cycle, we set 10.3 as the cut-off point where most new deprecations would be for removal in 12.x instead of 11.x. This is so that the majority of modules would only need to be compatible with 10.2 deprecations in order to be compatible with 11.0.

However πŸ“Œ Rename EntityReferenceTestTrait to help discoverability Fixed has shown that this was slightly optimistic. The trait deprecated in that issue was deprecated in 10.1 (released June 2023) for removal in 11.0.

June 2024 was the earliest release window for Drupal 11.0.0 to come out, so modules would theoretically not have to support 10.1 and 11.0 at the same time, except they actually do - if they want to test against 11.x alpha and beta releases. Because we intentionally have long alpha/beta windows for major releases, this creates a couple of months or more of overlap between 10.1 and 11.0 at precisely the time we want modules to start working on 11.x compatibility.

If we take June 2026 as the earliest possible release window for Drupal 12 and count backwards from there:

June 2026 - 12.0.0 + 11.4
December 2025: 11.3 (EOL December 2026)
June 2025: 11.2 (EOL June 2026)
December 2024: 11.1 (EOL December 2025)

If we want to avoid the same situation again, the latest that we can deprecate for removal in 12.x would be in the 11.1 minor release, 11.2 would need to start deprecating for removal in Drupal 13.

Steps to reproduce

Proposed resolution

From Drupal 11.2, target all potentially disruptive deprecations for removal in Drupal 13 where possible. Potentially do this for any highly disruptive 11.1/11.0 deprecations too if it's not likely to cause a large maintenance burden.

Exceptions would be:
1. Deprecated modules moving to contrib, for various reasons this is less disruptive closer to the new major release and also not really an API deprecation.
2. @internal code like controller/plugin constructors (unless it's something that is actually going to be very disruptive for some reason)
3. Inherited deprecations from upstream (phpunit, Symfony et al)
4. Deprecations with no replacement and similar situations where cross-minor/major compatibility is less of an issue.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🌱 Plan
Status

Active

Version

11.0 πŸ”₯

Component
OtherΒ  β†’

Last updated about 12 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom catch

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

Comments & Activities

  • Issue created by @catch
  • πŸ‡³πŸ‡±Netherlands bbrala Netherlands

    In regards to 'impact' a good way to at least see true usage in contrib we can user this search, which is pretty good at cleaning false positives:

    https://git.drupalcode.org/search?group_id=2&scope=blobs&search=-path%3A...

    Other than that I do think we should indeed be very weary of impact of deprecations. Considering core maintainance versus community impact.

    Possibly relevant ✨ Tooling for code upgrades topic, core gate, and maintainers Active .

  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    Can you post the actual search field query, I think your url is getting truncated. Incidentally I was looking for ways to check contrib usage and found the gitlab search to be a bit inconsistent. There is an issue to change the search backend for code search that will vastly improve it.

  • πŸ‡¬πŸ‡§United Kingdom catch

    Clicking on the URL itself worked for me.

  • πŸ‡³πŸ‡±Netherlands bbrala Netherlands

    Will repost, click indeed seems to have a ... in the center of the filter.

  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    Thanks @bbrala, that seems to work so much better than the searches I was doing!

    Just a couple of notes on limitations of that search I see still for others using it.

    1. It excludes distributions that include all of core as part of their project (probably fine since technically the distro isn't using the code technically and will get the changes when they update, also committing core isn't technically supported.
    2. It does not seem to properly handle yml keys and does some fuzzing even with quotes. e.g. search "country.default" instead of EntityReferenceTestTrait and you'll get a lot of false positives.

    I'll be using this in the future though for sure.

  • πŸ‡³πŸ‡ΏNew Zealand quietone

    I have been thinking about this since I first read the Slack discussion. Assuming I can count correctly, this would allow a minimum of 2 years for contrib to update for disruptive changes. That alone provides some stability and allows contrib maintainers more flexibility in when planning their upgrades. I think that is a very useful.

    The proposed solution is clear and easy to implement. The part that will require discussion in the issue is to determine if the change is disruptive. Fortunately, there is already a definition of disruptive changes β†’ in the policy docs. And @bbrala has supplied a link to help with the search. (Thanks @bbrala!) When this is resolved that information should be included in the continuous upgrades policy .

Production build 0.71.5 2024