Problem/Motivation
Drupal 10.1 requires guzzlehttp/guzzle 7
composer why guzzlehttp/guzzle
drupal/core 10.1.2 requires guzzlehttp/guzzle (^7.5) But the module requires (Via the SDK) guzzle 6
Your requirements could not be resolved to an installable set of packages.
Problem 1
- cloudflare/sdk[1.0.0, ..., 1.1.6] require guzzlehttp/guzzle ^6.2.2Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 3387455-cannot-install-on.patch | 314 bytes | bobi-mel |
Issue fork cloudflare-3387455
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
Comment #2
larowlanComment #4
timmillwoodLooks like it's not just guzzle, there's a similar issue with psr/http-message
Comment #7
bobi-mel commentedI've fixed the issue
Comment #8
rosk0The latest pipeline shows Guzzle 7.8.1 installed on Drupal core 10.2 no issues.
Updated: linked to the pipeline job.
Comment #9
hommesreponse commentedMy apologies if this is a stupid question but how do I apply the patch if I can't install the module via composer? Is there a way to apply the patch and run composer require at the same time?
Comment #10
lucashodge commentedI managed to install the cloudflare/sdk by using the instructions from here: https://www.drupal.org/project/cloudflare_node_cc/issues/3378080#comment...
I then had to composer require drupal/purge and manually install the cloudflare module to get this to work.
Comment #11
alex.skrypnykThere are more compatibility issues with `cloudflare/sdk`.
https://github.com/cloudflare/cloudflare-php/issues/235 says that the package is practically abandoned :(
Please see https://www.drupal.org/project/cloudflare/issues/3362051 to track the decoupling.
For now, using a fork with a patched `composer.json` is the only one solution for D10/D11.
Add to
composer.json:and run
composer require drupal/cloudflare:^2@betaComment #12
stephenplatz commentedI'm not able to install cloudflare:^2.0@beta on Drupal 10.4.5
Problem 1
- Root composer.json requires drupal/cloudflare ^2.0@beta -> satisfiable by drupal/cloudflare[2.0.0-beta1].
- cloudflare/sdk[1.0.0, ..., 1.1.6] require guzzlehttp/guzzle ^6.2.2 -> found guzzlehttp/guzzle[6.2.2, ..., 6.5.x-dev] but the package is fixed to 7.9.3 (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.
- cloudflare/sdk[1.1.7, ..., 1.4.0] require psr/http-message ~1.0 -> found psr/http-message[1.0, 1.0.1, 1.1] but the package is fixed to 2.0 (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/cloudflare 2.0.0-beta1 requires cloudflare/sdk ^1 -> satisfiable by cloudflare/sdk[1.0.0, ..., 1.4.0].
Interestingly, I was able to install it on another Drupal project using the same version. What are the options in case of composer conflicts?
Comment #13
stephenplatz commentedComment #14
bserem commentedDowngrading psr/http-message (2.0 => 1.1) solves the issue and it is highly probable you don't really need the new updated version.
Use
composer why psr/http-messageto figure out which module requires what and if you are blocked from using the older one for any reason.See https://github.com/cloudflare/cloudflare-php/pull/275
Comment #15
stephenplatz commentedThanks, using
composer require 'drupal/cloudflare:^2.0@beta' -Wwill downgrade psr/http-message, and resolve the dependency conflicts.Comment #16
todea commentedI'm still blocked from installing due to the s3fs module. s3fs requires aws/aws-sdk-php which in turn requires psr/http-message (^2.0).