Problem/Motivation

The Reroute Email in latest release 2.2.0 is not compatible with Drupal core older than 9.4 because of All hook invocation delegated to Module Handler service

  • Change module handler method from getImplementations to invokeAllWith

In settings form of this module get an error:

PHP message: Error: Call to undefined method Drupal\\Core\\Extension\\ModuleHandler::invokeAllWith() in /var/www/html/modules/contrib/reroute_email/src/Form/SettingsForm.php on line 225

Proposed resolution

Increase the minimum requirement to 9.4 | 10 in version 2.2.x

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

SebaZ created an issue. See original summary.

abyss’s picture

Version: 2.2.0 » 2.2.x-dev
Assigned: Unassigned » abyss

In general, the error in this release is not in the use of methods, but in the dependencies on Drupal versions. This needs to be updated.

bohart’s picture

Status: Active » Needs work

Let's do it in this way:

2.1.x - support Drupal from 8.8 up to 9.3 incl. (with old methods)
2.2.x - support Drupal from 9.4 and ^10 (with new methods)

So we need 2 MR to do so.
Then, we will set up Drupal tests accordingly.

And once/when all tests are passed, we will merge all of those and create releases accordingly.
Thanks!

abyss’s picture

Status: Needs work » Active

I am starting to work on changes for branch 2.1.

sebaz’s picture

@Abyss
that's what I wrote in proposed resolution: change requirements ;)

abyss’s picture

@SebaZ
Yes, I saw it later, I confused this one with a similar task)

  • bohart committed fd08ae3a on 2.1.x authored by Abyss
    Issue #3364031: Use of ModuleHandler::invokeAllWith() breaks Drupal with...

  • bohart committed f651549d on 2.2.x authored by Abyss
    Issue #3364031: Use of ModuleHandler::invokeAllWith() breaks Drupal with...

  • bohart committed 93e66836 on 2.1.x
    Issue #3364031 by Abyss, bohart: Update core_version_requirement to use...
bohart’s picture

Assigned: abyss » Unassigned
Status: Active » Fixed

Committed to both 2.1.x (^D8.8 & <=D9.3) and 2.2.x (^9.4 || ^10) branches.

This will be a part of the next releases of the module soon.
So the module will support both <D9.4 and ^D9.4 Drupal cores in its different releases.

Thanks @all!

Status: Fixed » Closed (fixed)

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