Requiring the AmazonS3 module via composer fails because of dependency on AWS SDK versions that don't exist. The nonexistent versions are uniformly suffixed with '-p1'.

$ composer require drupal/amazons3
Using version ^2.0 for drupal/amazons3
./composer.json has been updated
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - drupal/amazons3 2.0.0-beta1 requires aws/aws-sdk-php 2.8.2-p1 -> no matching package found.
    - drupal/amazons3 2.0.0-beta2 requires aws/aws-sdk-php 2.8.2-p1 -> no matching package found.
    - drupal/amazons3 2.0.0-beta3 requires aws/aws-sdk-php 2.8.3-p1 -> no matching package found.
    - drupal/amazons3 2.0.0 requires aws/aws-sdk-php 2.8.5-p1 -> no matching package found.
    - drupal/amazons3 2.1.0-beta1 requires aws/aws-sdk-php 2.8.19-p1 -> no matching package found.
    - drupal/amazons3 2.x-dev requires aws/aws-sdk-php 2.8.19-p1 -> no matching package found.
    - Installation request for drupal/amazons3 ^2.0 -> satisfiable by drupal/amazons3[2.x-dev, 2.1.0-beta1, 2.0.0, 2.0.0-beta3, 2.0.0-beta2, 2.0.0-beta1].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json to its original content.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rohnjeynolds created an issue. See original summary.

deggertsen’s picture

I'm running into this problem as well. Is there a workaround for this so that this module can still be usable?

radimklaska’s picture

The package exist: https://packagist.org/packages/aws/aws-sdk-php

composer require aws/aws-sdk-php:2.8.19-p1 results in: Could not find package aws/aws-sdk-php in a version matching 2.8.19-p1. Same goes for capgemini/drupal_doctrine_cache.

composer require aws/aws-sdk-php:2.8.19 works just fine. I'm not sure what the meaning of "-p1" is.

radimklaska’s picture

Here is a patch. Sadly it's applied too late for composer to pick up updated versions when used in project's composer.json

        "patches": {
            "drupal/amazons3": {
                "D.o #2933809 composer.json lists dependency on nonexistent AWS SDK versions" : "https://www.drupal.org/files/issues/2019-01-27/amazons3-composer_json_lists_dependency_on_nonexistent_AWS_SDK_versions-2933809-4-D7.patch"
            }
        },
radimklaska’s picture

Status: Active » Needs review

Workaround until this get resolved:
* drush dl amazons3 --pm-force
* and move amazons3 module to docroot/sites/all/modules/custom
* composer require aws/aws-sdk-php:2.8.19 capgemini/drupal_doctrine_cache:0.0.1

Also changing status since I provided patch in #4.

DamienMcKenna’s picture

Version: 7.x-2.0 » 7.x-2.x-dev
Status: Needs review » Reviewed & tested by the community

Seems straight forward.