Problem/Motivation

longwave commented that they tested a dead code detector. I then tried shipmonk/dead-code-detector on Admin. It doesn't understand hooks but did find things that can be cleaned up.

The errors from the detector can be seen in the results from the issue to add this dectector to core, https://git.drupalcode.org/project/drupal/-/jobs/9083937

Steps to reproduce

Proposed resolution

Fix errors detected by the dead code detector

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3582178

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

quietone created an issue. See original summary.

quietone’s picture

Issue summary: View changes

This also has renames for several hook methods, that is probably out of scope here.

quietone’s picture

Status: Active » Needs review
longwave’s picture

Status: Needs review » Reviewed & tested by the community

I think these are all good changes. Not injecting all those services might make every admin page a tiny bit faster. The method renames also make the intent a bit clearer.

amateescu’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed d09bf682dc3 to main and 1031e2c5693 to 11.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.

  • amateescu committed 1031e2c5 on 11.x
    task: #3582178 Remove dead code in Admin
    
    By: quietone
    By: longwave
    (...

  • amateescu committed d09bf682 on main
    task: #3582178 Remove dead code in Admin
    
    By: quietone
    By: longwave
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.