Problem/Motivation

When updating tmgmt_google_v3 to v1.0.5 in a Drupal 11 site and running drush site:install --existing-config -y, the process fails with a fatal TypeError. The constructor for the GoogleV3Translator plugin expects a Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher, but the container injects a Symfony\Component\EventDispatcher\EventDispatcher, causing an argument type mismatch and blocking installation or config import.

Steps to reproduce

  1. Update or install the tmgmt_google_v3 module version 1.0.5 in a Drupal 11.x site.
  2. Run drush site:install --existing-config -y.
  3. Observe the error and failed installation.
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

leoenriquezp created an issue. See original summary.

kallado’s picture

@leoenriquezp fixed on 1.0.6 thanks

kallado’s picture

Status: Active » 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.

balazswmann’s picture

This fix breaks the module for me on Drupal 10.5.6 The previous version (without this fix) works fine though. My error is this:

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)

Based on this, I guess the even dispatcher service event_dispatcher has somehow changed between Drupal 10 and 11.

kallado’s picture

balazswmann’s picture

@kallado I know, but this fix in the newest 1.0.6 release breaks the module for Drupal 10 sites (at least for 10.5.6). In other words, to me it seems like that by fixing the issue for Drupal 11, it broke the module for Drupal 10. Just try out the 1.0.6 release with Drupal 10.5.

kallado’s picture

@balazswmann That's strange because in the documentation https://www.drupal.org/node/3376090 it says it's introduced in branch 10.3.x and version 10.3.0 so 10.5.x shouldn't have any issues right?.

balazswmann’s picture

@kallado I still don't see the deprecation flag in Drupal 10.5.6 for ContainerAwareEventDispatcher. Seemingly it's still in use.

Anyways, I opened another issue, because this one is already closed. Let's continue the discussion there.