Problem/Motivation

I am using PHP 8.2 in my local and when i am trying to install the module, i am geting the following error:

 Problem 1
    - geocoder-php/common-http[4.1.0, ..., 4.2.0] require php ^7.0 -> your php version (8.2.0) does not satisfy that requirement.
    - geocoder-php/nominatim-provider[5.0.0, ..., 5.1.1] require php ^7.0 -> your php version (8.2.0) does not satisfy that requirement.
    - geocoder-php/common-http 4.3.0 requires php ^7.2 -> your php version (8.2.0) does not satisfy that requirement.
    - geocoder-php/nominatim-provider[5.2.0, ..., 5.3.0] require php ^7.2 -> your php version (8.2.0) does not satisfy that requirement.
    - geocoder-php/common-http[4.4.0, ..., 4.5.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.
    - drupal/cloud dev-6.x requires geocoder-php/nominatim-provider ^5 -> satisfiable by geocoder-php/nominatim-provider[5.0.0, ..., 5.7.0].
    - drupal/cloud 6.x-dev is an alias of drupal/cloud dev-6.x and thus requires it to be installed too.
    - geocoder-php/nominatim-provider[5.4.0, ..., 5.7.0] require geocoder-php/common-http ^4.1 -> satisfiable by geocoder-php/common-http[4.1.0, ..., 4.5.0].
    - Root composer.json requires drupal/cloud 6.x-dev@dev -> satisfiable by drupal/cloud[6.x-dev (alias of dev-6.x)].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

and if we downgrade the php, if there are other module's which is depends on > php 8.0 it won't work.

Steps to reproduce

Install the module on PHP > 8 environment

Issue fork cloud-3396795

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

MukhtarM created an issue. See original summary.

shiv_yadav’s picture

Assigned: Unassigned » shiv_yadav
shiv_yadav’s picture

Assigned: shiv_yadav » Unassigned
xiaohua guan’s picture

@shiv_yadav

The error is caused by psr/http-message. If you downgrade the version of the package from 2.0 to 1.1, I think the cloud module can be installed.

mukhtarm’s picture

I don't have psr/http-message package listed in my composer.json in D10. Although i could see an entry in the composer.lock as follows:

{
            "name": "psr/http-client",
            "version": "1.0.3",
            "source": {
                "type": "git",
                "url": "https://github.com/php-fig/http-client.git",
                "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90",
                "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90",
                "shasum": ""
            },
            "require": {
                "php": "^7.0 || ^8.0",
                "psr/http-message": "^1.0 || ^2.0"
            },
            "type": "library",
            "extra": {
                "branch-alias": {
                    "dev-master": "1.0.x-dev"
                }
            },
            "autoload": {
                "psr-4": {
                    "Psr\\Http\\Client\\": "src/"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "MIT"
            ],
            "authors": [
                {
                    "name": "PHP-FIG",
                    "homepage": "https://www.php-fig.org/"
                }
            ],
            "description": "Common interface for HTTP clients",
            "homepage": "https://github.com/php-fig/http-client",
            "keywords": [
                "http",
                "http-client",
                "psr",
                "psr-18"
            ],
            "support": {
                "source": "https://github.com/php-fig/http-client"
            },
            "time": "2023-09-23T14:17:50+00:00"
        },

Can you explain more how can downgrade the psr/http-message package to 1.1?

xiaohua guan’s picture

@mukhtarm

Can you try the command below?

composer require psr/http-message:1.1

mukhtarm’s picture

Yes now the issue is fixed. Thanks @Xiaohua Guan

yas made their first commit to this issue’s fork.