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.2

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#7 3387455-cannot-install-on.patch314 bytesbobi-mel

Issue fork cloudflare-3387455

Command icon 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:

  • 3387455-sdk-bump Comparecompare
  • 8.x-1.x Comparecompare
  • 2.0.x Comparecompare
  • 3387455-cannot-install-on Comparechanges, plain diff MR !18

Comments

larowlan created an issue. See original summary.

larowlan’s picture

Title: Compatibility with Guzzle 7 » Cannot install on Drupal 10.1 ➡️ Compatibility with Guzzle 7

jeff.hartman made their first commit to this issue’s fork.

Please note that my fork should not be merged.

timmillwood’s picture

Looks like it's not just guzzle, there's a similar issue with psr/http-message

bobi-mel made their first commit to this issue’s fork.

bobi-mel’s picture

Status: Active » Needs review
StatusFileSize
new314 bytes

I've fixed the issue

rosk0’s picture

Status: Needs review » Closed (works as designed)

The latest pipeline shows Guzzle 7.8.1 installed on Drupal core 10.2 no issues.

Updated: linked to the pipeline job.

hommesreponse’s picture

My 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?

lucashodge’s picture

I 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.

alex.skrypnyk’s picture

There 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:

"repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        },
       {
            "type": "vcs",
            "url": "https://github.com/andresgmh/cloudflare-php.git",
            "options": {
                "reference": "2cb793bc18cd530e9140af308b3627c814294a7d"
            }
        }
]

and run composer require drupal/cloudflare:^2@beta

stephenplatz’s picture

I'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?

stephenplatz’s picture

Status: Closed (works as designed) » Needs work
bserem’s picture

Downgrading 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-message to 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

stephenplatz’s picture

Thanks, using composer require 'drupal/cloudflare:^2.0@beta' -W will downgrade psr/http-message, and resolve the dependency conflicts.

todea’s picture

I'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).

nicxvan made their first commit to this issue’s fork.