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-messageis required by Drupal core, but 1.1 or ^2 is allowed.google/cloudthough has a hard dependency onpsr/http-message1.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
Comment #2
asherry commentedComment #3
slydevil commentedThe 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.
Comment #5
slydevil commentedTesting the update uncovers another issue:
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.
Comment #6
slydevil commentedComment #10
slydevil commentedUpdated the dependency from google/cloud (entire google cloud PHP SDK) to the google/cloud-storage package only. Added a beta4 release with this fix.
Comment #11
slydevil commented