Problem/Motivation

DeprecatedServicePropertyTrait hardcodes Drupal 11.0.0 as the removal deadline for every property.

Drupal’s deprecation guide still recommends the trait for injected service properties. Following that guidance for a new deprecation however leads to warnings with an expired deadline.

Proposed resolution

Allow each property to specify:

  • the Drupal version in which the property was deprecated,
  • the Drupal version in which the property is planned to be removed, and
  • the change record.

To allow contributed and custom classes migrate independently, we should keep accepting existing property => service ID mappings.

Remaining tasks

Review. Update the "How to deprecate" guide to show the new format.

User interface changes

None.

Introduced terminology

None.

API changes

None.

Data model changes

None.

Release notes snippet

n/a

Issue fork drupal-3635170

Command icon Show commands

Start 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

pancho created an issue. See original summary.

pancho’s picture

Issue summary: View changes
Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Needs work

Comments on the MR.

dcam’s picture

Status: Needs work » Closed (duplicate)
Issue tags: -deprecation

Thank you for your contribution, but this issue is a duplicate of #3519400: Update DeprecatedServicePropertyTrait for Drupal 12+, so I'm closing it. If you would like to continue contributing toward a fix, then please help move the other issue forward.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

pancho’s picture

@dcam: Oops, you're right, thanks.