Problem/Motivation

Using the latest 1.0.6 release with Drupal 10.5.6 I get the following TypeError when I install the module:

TypeError: Drupal\tmgmt_google_v3\Plugin\tmgmt\Translator\GoogleV3Translator::__construct(): Argument #6 ($event_dispatcher) must be of type Symfony\Component\EventDispatcher\EventDispatcher, Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher given, called in .../web/modules/contrib/tmgmt_google_v3/src/Plugin/tmgmt/Translator/GoogleV3Translator.php on line 91 in Drupal\tmgmt_google_v3\Plugin\tmgmt\Translator\GoogleV3Translator->__construct() (line 74 of .../web/modules/contrib/tmgmt_google_v3/src/Plugin/tmgmt/Translator/GoogleV3Translator.php)

There was a very similar issue previously #3555420 but the fix for that only resolved the problem for Drupal 11. Here you can see that the event_dispatcher service in Drupal 10.5 uses the Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher class, while Drupal 11 uses Symfony's class directly, namely Symfony\Component\EventDispatcher\EventDispatcher .

Steps to reproduce

Try to install the 1.0.6 release with Drupal 10.5 and see the error.

Proposed resolution

In the GoogleV3Translator plugin, change the event_dispatcher service's type to Symfony\Component\EventDispatcher\EventDispatcherInterface to resolve the issue for both Drupal 10 and Drupal 11.

Remaining tasks

User interface changes

API changes

Data model changes

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

balazswmann created an issue. See original summary.

ritarshi_chakraborty’s picture

Working on it.

ritarshi_chakraborty’s picture

Status: Active » Needs review

Please review my MR.

kallado’s picture

@ritarshi_chakraborty Thanks I'm kind of busy today but I'll try to check it asap an create a new release.

kallado’s picture

Tested and fixed in 1.0.7. Thanks for the help.

kallado’s picture

Status: Needs review » Fixed

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.

Status: Fixed » Closed (fixed)

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