Problem/Motivation

Received the following output after running static analysis using Phan.

web/modules/contrib/pathauto/src/AliasUniquifier.php:133 PhanDeprecatedFunction 
Call to deprecated function \Drupal\Core\Extension\ModuleHandlerInterface::getImplementations() defined at web/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php:191 
(Deprecated because: in drupal:9.4.0 and is removed from drupal:10.0.0. Instead you should use ModuleHandlerInterface::invokeAllWith() for hook invocations or you should use ModuleHandlerInterface::hasImplementations() to determine if hooks implementations exist.)

Please see https://www.drupal.org/node/3000490

CommentFileSizeAuthor
#4 pathauto_deprecated_fixed.patch665 bytesradheymkumar

Issue fork pathauto-3345256

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

amym-li created an issue. See original summary.

berdir’s picture

Title: [Drupal 10] ModuleHandlerInterface::getImplementations() is deprecated in D9.4 and removed in D10 » ModuleHandlerInterface::getImplementations() is deprecated in D9.4 and removed in D10
Version: 8.x-1.11 » 8.x-1.x-dev
Category: Bug report » Task

What phan doesn't tell you is that is that this is in a conditional block that is only executed if the new method doesn't exist.

We can eventually remove that when we require 9.4 but there's no urgency there.

mdeahmad made their first commit to this issue’s fork.

radheymkumar’s picture

Status: Active » Reviewed & tested by the community
StatusFileSize
new665 bytes

Hi @Berdir
I have fixed the deprecated issue please apply these are patch file.
Thanks

berdir’s picture

Status: Reviewed & tested by the community » Needs work

That is *not* what I'm asking for. Read the comment just above the changed line in your patch and my comment here.

namisha jadhav’s picture

Any update on this issue?

dww made their first commit to this issue’s fork.

dww’s picture

Title: ModuleHandlerInterface::getImplementations() is deprecated in D9.4 and removed in D10 » Silence deprecation about ModuleHandlerInterface::getImplementations() in BC layer
Status: Needs work » Needs review
Parent issue: » #3293221: D10: ModuleHandler::getImplementations() deprecation
berdir’s picture

Status: Needs review » Needs work

Drupal is EOL, I'm happy to just require 9.4 at this point and drop the BC layer.

dww’s picture

Title: Silence deprecation about ModuleHandlerInterface::getImplementations() in BC layer » Require Drupal 9.4 and remove BC layer using deprecated ModuleHandler::getImplementations()
Status: Needs work » Needs review

  • Berdir committed f465b5a7 on 8.x-1.x authored by dww
    Issue #3345256 by dww: Require Drupal 9.4 and remove BC layer using...
berdir’s picture

Status: Needs review » Fixed

Thanks.

dww’s picture

You’re welcome. Glad to help out. Thank you!

Status: Fixed » Closed (fixed)

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