Drupal 9 - Download with composer command not working

Created on 15 March 2023, almost 2 years ago
Updated 16 March 2023, almost 2 years ago

Problem/Motivation

Not able to download it in Drupal 9.5.x using the following command composer require 'drupal/content_snapshot:^3.0'

Steps to reproduce

Drupal version: 9.5.x
PHP version: 8.1
Composer: 2.2.12

Execute composer require 'drupal/content_snapshot:^3.0'

Problem 1
    - Root composer.json requires drupal/content_snapshot ^3.0 -> satisfiable by drupal/content_snapshot[3.0.0, 3.0.1, 3.0.x-dev].
    - drupal/content_snapshot[3.0.0, ..., 3.0.x-dev] require php >=8.0.0 -> your php version (7.3.0; overridden via config.platform, actual: 8.1.14) does not satisfy that requirement.

Proposed resolution

Remaining tasks

Fix the issue.

User interface changes

NA

API changes

NA

Data model changes

💬 Support request
Status

Closed: works as designed

Version

3.0

Component

Code

Created by

🇮🇳India prashant.c Dharamshala

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

Comments & Activities

  • Issue created by @prashant.c
  • Status changed to Fixed almost 2 years ago
  • 🇮🇳India prashant.c Dharamshala

    I was on PHP 8.0 and this module requires a version greater than this which is mentioned in the module's composer.json file therefore I upgraded to PHP 8.1.

    However, to fix the issue I removed the following lines from the composer.json file

    "platform": {
                 "php": "7.3.0"
         },
    

    https://getcomposer.org/doc/01-basic-usage.md#platform-packages
    Not sure about what impact it will make at other places but for now it has fixed the issue.

  • Status changed to Closed: works as designed almost 2 years ago
  • 🇦🇺Australia dpi Perth, Australia

    Please read the guidelines for tags https://www.drupal.org/node/3156530

    V3 requires 8.0. The config platform lines are for your project to simulate a PHP version for resolving dependencies. You should update this to whatever PHP version you are using on production, or remove it.

    There is no fix here, thusly it is WOD

  • 🇵🇱Poland Luke_Nuke

    @Prashant.c dpi is correct. The 3.0.x branch dropped support for PHP < 8.0; however, you should still be able to use the latest 2.0.x version if you need it to work on D9 with PHP < 8.0. It is not supported by me, but it functionally is not different from the 3.0.x right now and will work virtually the same. I would recommend you to upgrade your PHP to at least 8.0, though, which would be in accordance to Drupal's recommendation.

  • 🇮🇳India prashant.c Dharamshala

    Thanks @Luke_Nuke for the detailed response.

Production build 0.71.5 2024