[upstream] aws-sdk-php is incompatible with drupal/core-recommended: ^10.1

Created on 16 June 2023, over 1 year ago
Updated 12 July 2023, over 1 year ago

Problem/Motivation

The aws/aws-sdk-php is not compatible with guzzlehttp/promises:^2 which is locked by drupal/core-recommended 10.1.0-rc1 and above..

See:
https://github.com/aws/aws-sdk-php/pull/2707
(This will require PHP:^7.2)
https://github.com/aws/aws-sdk-php/issues/2713

---- Original Report ----
I recently upgraded to D10.1-rc1 and I tried to install s3fs 3.3 and got the error. Although the errors are due to aws/aws-sdk-php package's incompatibility with guzzlehttp/promises:^2.0 (Ref: https://github.com/aws/aws-sdk-php/blob/master/composer.json#L22) but it makes the module incompatible with D10.1-rc1 as D10.1-rc1 requires guzzlehttp/promises:^2.0(Ref: https://github.com/drupal/core-recommended/blob/10.1.0-rc1/composer.json...)

Steps to reproduce

  1. Install/Update drupal to D10.1-rc1 via composer with drupal/core-recommended:^10.1@rc
  2. Install drupal/s3fs:^3.3 via composer.

Proposed resolution

Remove drupal/core-recommended from sites root composer.json or remain on an older version of Drupal until the aws-sdk-php is updated.

Remaining tasks

Await resolution from upstream.

User interface changes

None

API changes

None expected

Data model changes

None expected.

💬 Support request
Status

Fixed

Version

3.3

Component

Code

Created by

🇮🇳India amangrover90

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

Comments & Activities

  • Issue created by @amangrover90
  • Status changed to Postponed: needs info over 1 year ago
  • 🇺🇸United States cmlara

    Note to self: Make sure to do one last test against the 'latest' version before pushing tagged release.

    It looks like core slipped this in about 2 weeks after we confirmed support in Use with Drupal 10.1 Fixed ..... Starting to think we maybe shouldn't be bumping our version up until X.Y.0 in the future.

    I'm just about to call it a night so I will not be able to look at this in depth today, however a quick test implies this might be just a core-recommended issue and that a drupal/core only install may work.

    wodby@php.container:/tmp/d101 $ composer require drupal/core
    wodby@php.container:/tmp/d101 $ composer why guzzlehttp/promises
    guzzlehttp/guzzle 7.7.0 requires guzzlehttp/promises (^1.5.3 || ^2.0) 
    wodby@php.container:/tmp/d101 $ composer require aws/aws-sdk-php -w
     - Locking aws/aws-sdk-php (3.273.1)
      - Downgrading guzzlehttp/promises (2.0.0 => 1.5.3)
      - Locking mtdowling/jmespath.php (2.6.1)
      - Downgrading psr/http-message (2.0 => 1.1)
    

    If you can test without drupal/core-recommended it would be helpful. It is possible that other modules may also require and prevent the downgrade.

    It would also probably be worth raising this with the AWS team if an issue doesn't already exist, to see if they can add ^2 support.

  • 🇨🇦Canada ambient.impact Toronto

    I can confirm that switching from drupal/core-recommended:^10.1@RC to drupal/core:^10.1@RC does indeed allow the AWS SDK to install:

    composer require 'drupal/s3fs:^3.3' --with-all-dependencies
    ./composer.json has been updated
    Running composer update drupal/s3fs --with-all-dependencies
    Gathering patches for root package.
    Loading composer repositories with package information
    Updating dependencies                                 
    Lock file operations: 4 installs, 1 update, 0 removals
      - Locking aws/aws-crt-php (v1.2.1)
      - Locking aws/aws-sdk-php (3.269.0)
      - Locking drupal/s3fs (3.3.0)
      - Downgrading guzzlehttp/promises (2.0.0 => 1.5.3)
      - Locking mtdowling/jmespath.php (2.6.1)
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 4 installs, 1 update, 0 removals
      - Downloading aws/aws-sdk-php (3.269.0)
      - Downloading drupal/s3fs (3.3.0)
    Gathering patches for root package.
    Gathering patches for dependencies. This might take a minute.
      - Installing aws/aws-crt-php (v1.2.1): Extracting archive
      - Downgrading guzzlehttp/promises (2.0.0 => 1.5.3): Extracting archive
      - Installing mtdowling/jmespath.php (2.6.1): Extracting archive
      - Installing aws/aws-sdk-php (3.269.0): Extracting archive
      - Installing drupal/s3fs (3.3.0): Extracting archive
    4 package suggestions were added by new dependencies, use `composer suggest` to see details.
    Generating autoload files
    100 packages you are using are looking for funding.
    Use the `composer fund` command to find out more!
    phpstan/extension-installer: Extensions installed
    No security vulnerability advisories found
    
  • Status changed to Postponed over 1 year ago
  • 🇺🇸United States cmlara

    Updating issue title and IS. Moving to postponed on upstream for compatibility with drupal/core-recomended anticpated to be released in August.

  • 🇮🇳India amangrover90

    It does work with drupal/core but since most of the users install drupal using drupal/recommended-project template, it makes the process trickier to uninstall drupal/core-recommended and install drupal/core.

  • 🇨🇦Canada ambient.impact Toronto

    @amangrover90 You're right but it's an issue with the AWS SDK so until aws-sdk-php becomes compatible with drupal/core-recommended: ^10.1, this seems like the only way to allow Drupal 10.1 to run the S3FS module for the moment. By the sounds of it, aws-sdk-php has a release planned for August that should be compatible.

  • 🇨🇦Canada ambient.impact Toronto

    Uh, whoops, I had this tab open and saved form values strike again. Reverted the issue summary to what @cmlara had most recently, but best to double check I didn't do more damage. 😅

  • 🇮🇳India amangrover90

    This got fixed in https://www.drupal.org/project/drupal/issues/3368790 🐛 guzzlehttp/promises 2.0 blocking update to 10.1 due to AWS SDK Fixed . Drupal 10.1.x-dev core-recommended has removed direct dependency on guzzlehttp/promises. Reference: https://github.com/drupal/core-recommended/blob/10.1.x/composer.json

  • Status changed to Fixed over 1 year ago
  • 🇺🇸United States cmlara

    Thanks for the update.

    Closing this out since core has removed the conflicting restriction and we should see this as a non issue in the near future, either from AWS or Core depending upon who releases first.

  • Hello everyone, I am using Drupal 10.1 but I still can not install this module and I don't know how to solve this issue. Any other solutions? Thanks.

  • 🇺🇸United States cmlara

    As noted above:

    The options are to remove drupal/core-recommended from the site root composer.json, or to wait for drupal/core-recommended 10.1.1 release which occurred at around 0842 UTC (see https://www.drupal.org/project/drupal/releases/10.1.1 )

    Either path should be sufficient to allow the s3fs module to be installed.

  • 🇨🇦Canada ambient.impact Toronto

    Can confirm that drupal/core-recommended 10.1.1 has fixed this!

  • It works with `drupal/core-recommended` 10.1.1 by using this command `composer require 'drupal/s3fs:^3.3' -W`

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024