Problem/Motivation
1.
In:
- #3571068: Remove deprecated code from lib/Extension, lib/Form, some left over in other folders (Mar 2026)
- #3573870: Remove deprecated code from user and basic_auth module (Apr 2026), and
- #3575461: Cleanup any remaining deprecations (Sep 2026),
most previously deprecated code was removed from main.
In the classes:
some of the deprecation code – namely the DeprecatedServicePropertyTrait and its $deprecatedProperties – was however left as a remnant.
2.
Previously, in
- #3493813: Drupal\Core\Theme\ComponentNegotiator::negotiate uses a lot of memory (Feb 2025), and
- #3540398: Remove Url generator from router class (Aug 2025)
some code was deprecated and partly removed from main.
Again, in the classes:
some of the deprecation code – namely the DeprecatedServicePropertyTrait and its $deprecatedProperties – still needs to be removed before releasing Drupal 12.0.
Example
use Drupal\Core\DependencyInjection\DeprecatedServicePropertyTrait;
[...]
class Permission extends AccessPluginBase implements CacheableDependencyInterface {
use DeprecatedServicePropertyTrait;
/**
* The service properties that should raise a deprecation error.
*/
private array $deprecatedProperties = ['moduleHandler' => 'module_handler'];
Proposed resolution
Remove the remnants.
Remaining tasks
None.
User interface changes
None.
Introduced terminology
None.
API changes
None.
Data model changes
None.
Release notes snippet
n/a
| Comment | File | Size | Author |
|---|
Issue fork drupal-3635157
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
Comment #3
panchoComment #4
panchoComment #5
smustgrave commentedBelieve some of those were kept around as examples
Comment #6
panchoWe will have new examples... 💁🏻
Comment #7
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.