googleads / googleads-php-lib

Google Ad Manager SOAP API Client Library for PHP
Apache License 2.0
656 stars 769 forks source link

Not available for Guzzlehttp version 7.4.0 update. #722

Closed jskorlol closed 2 years ago

jskorlol commented 3 years ago
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires googleads/googleads-php-lib ^54.0 -> satisfiable by googleads/googleads-php-lib[54.0.0].
    - googleads/googleads-php-lib 54.0.0 requires guzzlehttp/psr7 ^1.2 -> found guzzlehttp/psr7[1.2.0, ..., 1.x-dev] but the package is fixed to 2.1.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.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require googleads/googleads-php-lib:*" to figure out if any version is installable, or "composer require googleads/googleads-php-lib:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

PSR7 has been updated to 2.0. Currently unavailable. I'm using guzzlehttp downgraded to 7.2.0.

thangduo commented 3 years ago

Hi,

We don't have a composer.lock file at the root of this library. So, I think you are having issues with your local version of the composer.lock file.

Could you please try to follow composer's suggestion below?

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

Thanks, Thang

vfalduto commented 2 years ago

The problem is from the composer requirement "guzzlehttp/psr7": "^1.2". in the googleads-php-lib library. A new version is available (right now 2.1)

Some library and framework like Symfony required the new version in their last update.

gn-mtrlitza commented 2 years ago

We have the same problem and with the changes of https://github.com/googleads/googleads-php-lib/pull/732 it works fine. Would be great if the PR gets reviewed and merged.

thangduo commented 2 years ago

Hi all,

I am making a new release of this library. When deleting the composer.lock file and re-run composer install, I can see that the new composer.lock file correctly allows both guzzle/psr7 version 1 and 2:

...
"guzzlehttp/guzzle": "^5.3.1|^6.2.1|^7.0",
"guzzlehttp/psr7": "^1.7|^2.0",
...

I'm closing this issue and will reject the pull request because this problem can be resolved by updating the composer.lock file only.

Thanks, Thang

leolll commented 2 years ago

Line 11 of this project's composer.json file only lists "guzzlehttp/psr7": "^1.2",: https://github.com/googleads/googleads-php-lib/blob/master/composer.json#L11

On a fresh install of Laravel, this requirement causes dependence issues. #732 would fix this.