Cannot meet requirement of Drupal 10 guzzlehttp/guzzle version

Created on 8 May 2023, over 1 year ago
Updated 17 November 2023, about 1 year ago

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

Problem 1
- drupal/oai_pmh_harvester 2.x-dev is an alias of drupal/oai_pmh_harvester dev-2.x and thus requires it to be installed too.
- drupal/oai_pmh_harvester 2.0.0 requires drupal/core ^8 || ^9 -> found drupal/core[8.0.0-beta6, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev] but the package is fixed to 10.0.8 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- drupal/oai_pmh_harvester[dev-2.x, 2.0.1, ..., 2.0.2] require guzzlehttp/guzzle ^6.3 -> found guzzlehttp/guzzle[6.3.0, ..., 6.5.x-dev] but the package is fixed to 7.5.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- Root composer.json requires drupal/oai_pmh_harvester ^2.0 -> satisfiable by drupal/oai_pmh_harvester[2.0.0, 2.0.1, 2.0.2, 2.x-dev (alias of dev-2.x)].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡³China fishfree

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

Comments & Activities

  • Issue created by @fishfree
  • πŸ‡ΏπŸ‡¦South Africa rudolfbyker South Africa

    Hi, please provide steps to reproduce the problem, rather than simply pasting an error message. I need more context to be able to help you with this.

  • πŸ‡¨πŸ‡³China fishfree

    @rudolfbyker Thank you for your response! The title said the reason, the composer require command console log said the detail. :-) Could you please change the guzzlehttp/guzzle version in composer.json of this module if there is no bug?

  • πŸ‡­πŸ‡ΊHungary tikaszvince

    Hi @rudolfbyker

    These are the steps you can reproduce this problem:

    1. Start a new drupal project with composer:
      composer create-project drupal/recommended-project:10.0.9 "install-dir"
    2. Step into "install-dir"
      cd install-dir
    3. Try to install oai_pmh_harvester with composer
      composer require drupal/oai_pmh_harvester

    composer will report about requirement version mismatch

    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - drupal/oai_pmh_harvester 2.0.0 requires drupal/core ^8 || ^9 -> found drupal/core[8.0.0, ..., 8.9.20, 9.0.0, ..., 9.5.9] but the package is fixed to 10.0.9 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
        - drupal/oai_pmh_harvester[2.0.1, ..., 2.0.2] require guzzlehttp/guzzle ^6.3 -> found guzzlehttp/guzzle[6.3.0, ..., 6.5.8] but the package is fixed to 7.5.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
        - Root composer.json requires drupal/oai_pmh_harvester * -> satisfiable by drupal/oai_pmh_harvester[2.0.0, 2.0.1, 2.0.2].

    As this reports says oai_pmh_harvester composer.json says it requires "guzzlehttp/guzzle": "^6.3"
    But Drupal core requiers ^7.5 version.

    I think since the used "caseyamcl/phpoaipmh" packages requires guzzlehttp/guzzle you do not need to lock this requirement at all.

    So my suggestion is remove this requirement from composer or change the required version to match both Drupal and phpoapmh requirements

  • πŸ‡ΏπŸ‡¦South Africa rudolfbyker South Africa

    Thanks for the reproduction. That saved me a lot of time.

    I think since the used "caseyamcl/phpoaipmh" packages requires guzzlehttp/guzzle you do not need to lock this requirement at all.

    Almost correct, but not quite. If oai_pmh_harvester used guzzle directly, we would need to keep it, even if it's provided by caseyamcl/phpoaipmh. But it looks like we are not using guzzle directly, so your patch is good.

  • Status changed to Needs review over 1 year ago
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.1 & MariaDB 10.3.22
    last update over 1 year ago
    Patch Failed to Apply
  • πŸ‡ΏπŸ‡¦South Africa rudolfbyker South Africa
  • πŸ‡­πŸ‡ΊHungary tikaszvince

    Hi @rudolfbyker,

    Is there any chance to create a new, D10 compatible release which contains this fix too?

  • Status changed to Fixed about 1 year ago
  • πŸ‡ΏπŸ‡¦South Africa rudolfbyker South Africa

    Done!

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

Production build 0.71.5 2024