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
Issue fork tmgmt_google_v3-3559198
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
Comment #2
ritarshi_chakraborty commentedWorking on it.
Comment #4
ritarshi_chakraborty commentedPlease review my MR.
Comment #5
kallado commented@ritarshi_chakraborty Thanks I'm kind of busy today but I'll try to check it asap an create a new release.
Comment #7
kallado commentedTested and fixed in 1.0.7. Thanks for the help.
Comment #8
kallado commented