Problem/Motivation

I'm having trouble installing this with Drupal 10.1.

  Problem 1
    - drupal/core-recommended is locked to version 10.1.1 and an update of this package was not requested.
    - guzzlehttp/psr7[2.5.0, ..., 2.6.x-dev] require psr/http-message ^1.1 || ^2.0 -> satisfiable by psr/http-message[1.1, 2.0, 2.0.x-dev].
    - You can only install one version of a package, so only one of these can be installed: psr/http-message[1.0, 1.0.1, 1.1, 2.0, 2.0.x-dev].
    - google/cloud v0.191.0 requires psr/http-message 1.0.* -> satisfiable by psr/http-message[1.0, 1.0.1].
    - drupal/gcsfs[1.0.0-beta1, ..., 1.0.0-beta2] require google/cloud ^0.191 -> satisfiable by google/cloud[v0.191.0].
    - drupal/core-recommended 10.1.1 requires guzzlehttp/psr7 ~2.5.0 -> satisfiable by guzzlehttp/psr7[2.5.0, 2.5.x-dev].
    - Root composer.json requires drupal/gcsfs ^1.0@beta -> satisfiable by drupal/gcsfs[1.0.0-beta1, 1.0.0-beta2].
  • psr/http-message is required by Drupal core, but 1.1 or ^2 is allowed.
  • google/cloud though has a hard dependency on psr/http-message 1.0.0 or 1.0.
  • The only way to install the module is to alias version 1.1 to 1.0.1.
  • composer require psr/http-message:"1.1 as 1.0.1"

I understand this is really a google/cloud issue, but any advice or tips out there on how to see this through? Commenting in the google github community about installing on a Drupal site seems way more out of context than commenting here.

Comments

asherry created an issue. See original summary.

asherry’s picture

Issue summary: View changes
slydevil’s picture

The version of google-cloud-php package that this module includes is "google/cloud": "^0.191" as you can see here: https://git.drupalcode.org/project/gcsfs/-/blob/1.0.0-beta2/composer.jso...

That version of google-cloud-php package requires "psr/http-message": "1.0.*", as you can see here: https://github.com/googleapis/google-cloud-php/blob/v0.191.0/composer.js...

The latest version of google-cloud-php package requires "psr/http-message": "^1.0|^2.0", as you can see here: https://github.com/googleapis/google-cloud-php/blob/v0.213.0/composer.js...

Looking into the composer documentation, because in my mind composer should choose the latest version (0.213), there is some explicit language around pre-1.0 versions that is the root of the issue. Because the version of the google-cloud-php package is 0.191.0 and the composer json file is using caret notation it's essentially locking the version to 0.191.0 when my intention was to set it to between 0.191.0 and 1.0.0. The caret notation does not work the way I expected but what I expected can be accomplished with the tilde notation "google/cloud": "~0.213".

Apologies for the explanation, writting it down has helped me to keep it straight.

I'll play around with the composer config for the module to see if what I've outlined above will work. Stay tuned.

  • slydevil committed 3b6591d2 on 1.0.x
    Issue #3376320: Issues with Drupal core 10.1
    
slydevil’s picture

Testing the update uncovers another issue:

$ composer require 'drupal/gcsfs:1.0.x-dev@dev'

./composer.json has been updated
Running composer update drupal/gcsfs
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - drupal/core-recommended is locked to version 10.1.1 and an update of this package was not requested.
    - drupal/gcsfs dev-1.0.x requires google/cloud ~0.213 -> satisfiable by google/cloud[v0.213.0].
    - google/cloud v0.213.0 conflicts with psr/log >=3.
    - drupal/gcsfs 1.0.x-dev is an alias of drupal/gcsfs dev-1.0.x and thus requires it to be installed too.
    - drupal/core-recommended 10.1.1 requires psr/log ~3.0.0 -> satisfiable by psr/log[3.0.0].
    - Root composer.json requires drupal/gcsfs 1.0.x-dev@dev -> satisfiable by drupal/gcsfs[1.0.x-dev (alias of dev-1.0.x)].

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

Unfortunately there is no version of google-cloud-php that can use psr/log and can also use psr/http-message:^1.1 or ^2.0.

In the meantime I need to lock this to Drupal core 10.0.

slydevil’s picture

Assigned: Unassigned » slydevil
Category: Support request » Bug report
Priority: Normal » Critical

  • slydevil committed ae1e0eeb on 1.0.x
    Issue #3376320 by slydevil: Update google/cloud to latest working...

  • slydevil committed 498d9b8e on 1.0.x
    Issue #3376320 by slydevil: update google/cloud version so the error can...

  • slydevil committed 248e3827 on 1.0.x
    Issue #3376320 by slydevil: swap the entire google/cloud package for the...
slydevil’s picture

Status: Active » Fixed

Updated the dependency from google/cloud (entire google cloud PHP SDK) to the google/cloud-storage package only. Added a beta4 release with this fix.

slydevil’s picture

Status: Fixed » Closed (fixed)