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
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:
- 3635170-allow-deprecatedservicepropertytrait
changes, plain diff MR !17679
Comments
Comment #3
panchoComment #4
smustgrave commentedComments on the MR.
Comment #5
dcam commentedThank 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.
Comment #7
pancho@dcam: Oops, you're right, thanks.