Problem/Motivation

Right now it is not possible to use this module with Drupal 10.1, guzzlehttp/guzzle 7.7.0 and psr/http-message 2.0 because current cloudflare/sdk library version 1.1 is using:

    "guzzlehttp/guzzle": "^7.0.1",
    "php": ">=7.2.5",
    "psr/http-message": "~1.0"

Steps to reproduce

If you have Drupal 10.1, guzzlehttp/guzzle 7.7.0 and psr/http-message 2.0 in your project, then try to install the module with Composer: composer require 'drupal/cloudflare_node_cc:^1.0'

Composer will tell you:

cloudflare/sdk[1.1.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.7.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.
    - cloudflare/sdk[1.1.7, ..., 1.3.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.

Proposed resolution

While they update cloudflare/sdk, I have overridden the cloudflare/sdk library by a forked repository which contains the required libraries compatible with D10.1 in the composer.json file.

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:

Comments

andresgmh created an issue. See original summary.

andresgmh’s picture

Status: Active » Closed (won't fix)

Please close this issue and delete the fork.

It didn't work due an issue with a recursively package composer dependency in the module's composer.json file . I resolved library dependencies by adding my forked cloudflare/sdk repository as VCS repository in the main composer.json file of the project:

1. Exclude cloudflare/sdk in the repository

        {
            "type": "composer",
            "url": "https://packages.drupal.org/8",
            "exclude": [
                "cloudflare/sdk",
            ]
        },

2. Add the new VCS repository

        {
            "type": "vcs",
            "url": "git@github.com:andresgmh/cloudflare-php.git"
        }

3. then composer require cloudflare/sdk:dev-master