Cannot update to 3.x

Created on 23 June 2023, about 1 year ago
Updated 18 August 2023, 11 months ago

Problem/Motivation

Attempting to update to 3.x using ...

composer require 'drupal/schema_metatag:^3.0' -W

...results in...

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires drupal/schema_metatag ^3.0 -> satisfiable by drupal/schema_metatag[3.0.0, 3.0.1, 3.0.x-dev].
    - drupal/schema_metatag[3.0.0, ..., 3.0.x-dev] require drupal/metatag ^2.0 -> found drupal/metatag[dev-2.0.x, 2.0.0-rc1, 2.0.0-rc2, 2.0.x-dev (alias of dev-2.0.x)] but it conflicts with your root composer.json require (^1.16).
Installation failed, reverting ./composer.json and ./composer.lock to their original content.

In an attempt to deal with that using...

composer require 'drupal/metatag:^2.0@RC' -W

...results in...

Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - Root composer.json requires drupal/metatag ^2.0@RC, found drupal/metatag[2.0.0-rc1, 2.0.0-rc2] but these were not loaded, likely because it conflicts with another require.
  Problem 2
    - drupal/schema_metatag is locked to version 2.5.0 and an update of this package was not requested.
    - drupal/schema_metatag 2.5.0 requires drupal/metatag ^1.0 -> found drupal/metatag[1.0.0, ..., 1.25.0] but it conflicts with your root composer.json require (^2.0@RC).
Installation failed, reverting ./composer.json and ./composer.lock to their original content.

We appear to be stuck in some kind of deadlock situation?

What am I missing here? Can anyone please help us to overcome this?

Thank you

💬 Support request
Status

Fixed

Version

3.0

Component

Miscellaneous

Created by

🇬🇧United Kingdom SirClickALot Somerset

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @SirClickALot
  • Status changed to Fixed about 1 year ago
  • 🇺🇸United States DamienMcKenna NH, USA

    You need to require both new versions at the same time:
    composer require drupal/metatag:^2 drupal/schema_metatag:^3

  • 🇬🇧United Kingdom SirClickALot Somerset

    Great, thanks @DamienMcKenna → ,

    Another trick under the belt!

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

  • Status changed to Fixed 12 months ago
  • 🇮🇷Iran amir jamshidi

    thanks @DamienMcKenna

  • 🇦🇷Argentina seghezzou2

    Hello good people, I'm trying the solution provided by @DamienMcKenna
    but I'm getting

    Installation failed, reverting ./composer.json and ./composer.lock to their original content.
    composer [require drupal/metatag:^2 drupal/schema_metatag:^3] failed, composer command failed: exit status 2. stderr=

    Running on Drupal 9.5.5

  • 🇺🇸United States DamienMcKenna NH, USA

    Try adding the "-v" flag to the command to get more details on what happened.

  • 🇦🇷Argentina seghezzou2

    Per my understanding, PHP version it's correct. I'm running the project on ddev

    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - Root composer.json requires drupal/metatag ^2 -> satisfiable by drupal/metatag[2.0.0-rc1, 2.0.0-rc2, 2.0.0, 2.0.x-dev].
        - drupal/metatag[2.0.0-rc1, 2.0.0-rc2, 2.0.0, 2.0.x-dev] require php >=8.0 -> your php version (7.4; overridden via config.platform, actual: 8.0.28) does not satisfy that requirement.
      Problem 2
        - Root composer.json requires drupal/schema_metatag ^3 -> satisfiable by drupal/schema_metatag[3.0.0, 3.0.1, 3.0.x-dev].
        - drupal/schema_metatag[3.0.0, 3.0.1, 3.0.x-dev] require php >=8.0 -> your php version (7.4; overridden via config.platform, actual: 8.0.28) does not satisfy that requirement.
    
    
    Installation failed, reverting ./composer.json and ./composer.lock to their original content.
    composer [require drupal/metatag:^2 drupal/schema_metatag:^3 -v -W] failed, composer command failed: exit status 2. stderr=
  • 🇺🇸United States DamienMcKenna NH, USA

    Yes, Metatag 2 requires PHP 8.0, so you'll have to update your ddev configuration, composer.json and server.

  • 🇺🇸United States DamienMcKenna NH, USA

    I added a note to the Metatag 2.0.0 release notes that it requires PHP 8.0.

  • 🇦🇷Argentina seghezzou2

    Thanks @damienmckenna, so you are saying that haven't PHP version updated on ddev only it's not enough, right, I should check for PHP required version on composer.json

  • 🇺🇸United States DamienMcKenna NH, USA

    You need to check them all - you won't be able to use Composer if the local PHP is running PHP 7, you won't be able to update the codebase if composer.json is locked at PHP 7, you'll have problems running the codebase in ddev if it isn't running PHP 8.0, and you won't be able to deploy the changes to the production server(s) if it/they also aren't on PHP 8.

Production build 0.69.0 2024