Problem/Motivation
We already decided in [another issue which I can't find right now] that 8.8.x is the last place where we'll deprecate code for removal in Drupal 9.
This means that new deprecations in 8.9.x will be removed in Drupal 10, but this raises some issues. We want modules to remove 8.x deprecations asap, and particularly in the next ~8 months in the run up to the 9.0.0 release, Drupal 10 deprecations on top of this mean extra work to get a module passing against 8.9.x/9.0.x that isn't necessary right now.
Proposed resolution
There are a handful of option each with their own drawbacks:
1. Add new deprecations in 8.9.x and 9.0.x to be removed in 10.0.0 and don't change anything else. Modules using this deprecated code will see warnings about them in test runs, phpstan reports, IDEs same as they would for deprecation messages.
Pros:
- no changes to our deprecation policy (except the version)
- Enforces that Drupal core will remove usages
- contrib doesn't start building up Drupal 9 technical debt before it's even released
Cons:
- noise for people who are just trying to do the minimum to get their modules compatible with 9.0.x
- modules that update for these deprecations won't be compatible with 8.8.x
2. Same as #1 except additionally suppress all 10.0.x deprecation messages in test runs
Pros:
- No changes in the deprecation code
- Contrib can pass against 8.9.x (and 9.0.x if we make the same change there) without fixing these deprecations
Cons:
- core test runs won't flag usages of suppressed deprecations
- deprecations will still show up in automated tools (phpstan might be adjustable to ignore them) and IDES (probably not adjustable).
3. Add the deprecations to 9.0.x as normal, but don't actually deprecate anything in 8.9.x - while adding the new code anyway.
Pros:
- Modules will be able to get clean runs of everything against 8.9.x without addressing these at all, but the new APIs will be available.
Cons:
- still warnings on 9.0.x
- potentially confusing for new developers since there will be duplicated APIs without a clear indication of which to use
- Requires two versions of patches.
4. Don't commit the patches to 8.9.x at all, leave them in 9.0.x
Pros:
- easy for modules to update to 8.9.x
Cons:
- Modules that update against 9.0.x will introduce incompatibilities with 8.9.x quicker
- divergence between 9.0.x and 8.9.x
5. Don't commit the patches to either 8.9.x or 9.0.x, hold them until 9.1.x
Pros:
- no noise or tooling changes
Cons:
- some critical or major bugs (or Drupal 9 readiness issues) will require new deprecations, what about them?
- accumulation of technical debt and RTBC/postponed issues.
6. Add the new code to 8.9.x and 9.0.x, without deprecating the old code. Post follow-ups to deprecate in 9.1.x
Pros:
- Modules will be able to get clean runs of everything against 8.9.x and 9.0.x without addressing these at all, but the new APIs will be available.
Cons:
- potentially confusing for new developers since there will be duplicated APIs without a clear indication of which to use
- Requires follow-up issues and patches against 9.1.x
7. Add the new code to 8.9.x and 9.0.x, without deprecating the old code. Deprecate immediately in 9.1.x
Pros: all the best bits of the above
Cons: more core branches to maintain than ever before in the history of Drupal
Remaining tasks
Pick one.
User interface changes
API changes
Data model changes
Release notes snippet