Problem/Motivation

Updating metatag 2.2.0 → 2.2.3 will crash the site if drupal/token is not updated to the latest version.

In DefinitionErrorExceptionPass.php line 51:

    Cannot autowire service "Drupal\metatag\Hook\TokenHooks": argument "$token_entity_mapper" of method "__construct()" references interface "Drupal\tok
    en\TokenEntityMapperInterface" but no such service exists. You should maybe alias this interface to the existing "token.entity_mapper" service.

Steps to reproduce

Update metatag while keeping token to 1.15.0

Proposed resolution

Update the composer.json (https://git.drupalcode.org/project/metatag/-/blob/2.2.x/composer.json?re...) to indicate the new minimum compatible version

Remaining tasks

Review

User interface changes

None

API changes

None

Data model changes

None

Issue fork metatag-3633958

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

bserem created an issue. See original summary.

bserem’s picture

Status: Active » Needs review

bserem’s picture

Issue summary: View changes

damienmckenna changed the visibility of the branch 2.2.x to hidden.

damienmckenna’s picture

Title: Latest version of metatag relies on drupal/token:^1.17 » Metatag 2.2.1+ relies on Token ^1.17

Thank you for reporting the bug and providing a possible fix.

I wonder if it would work with 8.x-1.16?

damienmckenna’s picture

damienmckenna’s picture

Status: Needs review » Reviewed & tested by the community

I confirmed that 1.16 was not enough, it does in fact require 1.17.

Thank you!

damienmckenna’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thank you,

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.

bserem’s picture

Wow! Super fast response!

Thanks for the new release