Problem/Motivation

The following classes have deprecated properties that should have been removed before Drupal 12.

  • core/lib/Drupal/Core/Routing/RouteBuilder.php
  • core/lib/Drupal/Core/Routing/Router.php
  • core/lib/Drupal/Core/Theme/ComponentNegotiator.php
  • core/modules/user/src/Plugin/views/access/Permission.php
  • core/modules/user/src/Plugin/views/filter/Permissions.php
  • core/modules/user/src/Theme/AdminNegotiator.php

I was involved in removing some other deprecated code for D12. I can guess that these were missed because we were grepping Core for deprecation strings. All of these properties were deprecated via the DeprecatedServicePropertyTrait, which means they wouldn't have shown up in searches. Also, from what I saw none of these property deprecations were tested. Frequently other deprecations in those issues were tested, for example constructor argument deprecations, but the properties were not covered.

I think it's also important to note that all of these have incorrect deprecation messages. The trait hard-codes 11.0.0 as the removal version for properties. See #3519400: Update DeprecatedServicePropertyTrait for Drupal 12.

One additional use of the trait should have the removal scheduled for Drupal 13 and is out of the scope of this issue: core/lib/Drupal/Core/Plugin/Discovery/DirectoryWithMetadataDiscovery.php.

Proposed resolution

Delete the properties before RC1.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3639248

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

dcam created an issue. See original summary.

dcam’s picture

Issue summary: View changes
sapnil_biswas’s picture

Assigned: Unassigned » sapnil_biswas

I will take this on and raise a MR soon!

dcam’s picture

Assigned: sapnil_biswas » Unassigned

I will take this on and raise a MR soon!

Please see the proposed resolution section. I've tried to get the attention of the framework managers about whether we should do this at all or if this has to be put off until Drupal 13. You may want to wait to work on this until the issue is cleared to proceed.

Also, please read our policy on assigning Core issues. We request that contributors do not assign issues to themselves unless there is a very good reason for doing so.

sapnil_biswas’s picture

Sorry for assigning the issue to myself without checking the assignment policy first. Thanks for the clarification.
I will not change anything until the framework managers have had the chance to discuss and clarify the proposed resolution.
Thanks for the guidance, will bear in mind for future core issues.

godotislate’s picture

Issue tags: +rc eligible

Discussed with @catch and @xjm and we're leaning toward wanting to get this in for the Drupal 12 RC.

dcam’s picture

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

@sapnil_biswas I was asked if I could do the work on this issue quickly. So I ended up taking care of it myself. You are welcome to review my changes and provide feedback.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Note for D13 we need to grep for deprecatedProperties too.

This LGTM.

  • catch committed 7d084eaa on 12.0.x
    task: #3639248 Remove deprecated class properties
    
    By: dcam
    By:...

  • catch committed 55705527 on main
    task: #3639248 Remove deprecated class properties
    
    By: dcam
    By:...
catch’s picture

Version: main » 12.0.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to main and cherry-picked to 12.0.x, thanks!

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.