Cloudflare SDK D10.1 compatibility

Created on 30 July 2023, over 1 year ago
Updated 31 July 2023, over 1 year ago

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.

Feature request
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

🇨🇴Colombia andresgmh

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @andresgmh
  • @andresgmh opened merge request.
  • @andresgmh opened merge request.
  • Status changed to Closed: won't fix over 1 year ago
  • 🇨🇴Colombia andresgmh

    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

Production build 0.71.5 2024