omnipay icon indicating copy to clipboard operation
omnipay copied to clipboard

Laravel 8 Conflict

Open marbuser opened this issue 4 years ago • 5 comments

Laravel 8 Upgraded to Guzzle 7. Omnipay uses php-http/guzzle6-adapter which has a constraint set for only Guzzle 6.

marbuser avatar Sep 09 '20 02:09 marbuser

You can specify a different adapter by using omnipay/common instead of league/omnipay:

composer require omnipay/common:^3 php-http/curl-client

nielspeen avatar Sep 09 '20 08:09 nielspeen

I think Guzzle 7 supports the php-http implementation directly, so can you try with just omnipay/common instead of league/omnipay? I'll test with requiring Guzzle 7 by default now: https://github.com/thephpleague/omnipay/pull/615

barryvdh avatar Sep 09 '20 11:09 barryvdh

@barryvdh Nope, I changed it and same issue.

"omnipay/common": "^3.0",
"omnipay/paypal": "^3.0",
$ composer update
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
    - Installation request for omnipay/common ^3.0 -> satisfiable by omnipay/common[3.0.x-dev, v3.0-RC1, v3.0-RC2, v3.0-alpha.1, v3.0-alpha.2, v3.0-alpha.3, v3.0-alpha.4, v3.0-beta.1, v3.0-beta.2, v3.0-beta.3, v3.0.0, v3.0.1, v3.0.2, v3.0.3, v3.0.4].
    - Can only install one of: guzzlehttp/guzzle[7.0.1, 6.5.x-dev].
    - Can only install one of: guzzlehttp/guzzle[7.0.x-dev, 6.5.x-dev].
    - Can only install one of: guzzlehttp/guzzle[7.1.x-dev, 6.5.x-dev].
    - Can only install one of: guzzlehttp/guzzle[6.5.x-dev, 7.0.1].
    - Conclusion: install guzzlehttp/guzzle 6.5.x-dev
    - Installation request for guzzlehttp/guzzle ^7.0.1 -> satisfiable by guzzlehttp/guzzle[7.0.1, 7.0.x-dev, 7.1.x-dev].

bbashy avatar Sep 15 '20 17:09 bbashy

@marbuser you can check that in September 2020, a few days after this post got written, Composer got an update with Guzzle 7: https://github.com/thephpleague/omnipay/commit/1ba7c8a3312cf2342458b99c9e5b86eaae44aed2

carlos-mg89 avatar Aug 03 '21 14:08 carlos-mg89

Hi..! I'm also trying to run composer require league/omnipay:^3 omnipay/paypal in my Laravel 8 project but having following issue: Problem 1 - php-http/guzzle6-adapter[v1.1.0, ..., v1.1.1] require guzzlehttp/guzzle ^6.0 -> found guzzlehttp/guzzle[6.0.0, ..., 6.5.x-dev] but it conflicts with your root composer.json require (^7.0.1). - league/omnipay v3.0.0 requires php-http/guzzle6-adapter ^1.1 -> satisfiable by php-http/guzzle6-adapter[v1.1.0, v1.1.1]. - Root composer.json requires league/omnipay 3 -> satisfiable by league/omnipay[v3.0.0]. 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 omnipay/paypal:*" to figure out if any version is installable, or "composer require omnipay/paypal:^2.1" if you know which you need.

After that when I try running composer require league/omnipay:^3 omnipay/paypal -W it gives me following error: Problem 1 - php-http/guzzle6-adapter[v1.1.0, ..., v1.1.1] require guzzlehttp/guzzle ^6.0 -> found guzzlehttp/guzzle[6.0.0, ..., 6.5.x-dev] but it conflicts with your root composer.json require (^7.0.1). - league/omnipay v3.0.0 requires php-http/guzzle6-adapter ^1.1 -> satisfiable by php-http/guzzle6-adapter[v1.1.0, v1.1.1]. - Root composer.json requires league/omnipay 3 -> satisfiable by league/omnipay[v3.0.0].

My composer file: "require": { "php": "^7.3|^8.0", "fruitcake/laravel-cors": "^2.0", "guzzlehttp/guzzle": "^7.0.1", "laravel/framework": "^8.75", "laravel/sanctum": "^2.11", "laravel/tinker": "^2.5" },

Anybody, please help me with this issue!

Further more, I tried running: composer require league/common:^3 which gives error stated: Could not find package league/common. And composer require omnipay/common:^3 which gives the following: Problem 1 - Root composer.json requires omnipay/common 3 -> satisfiable by omnipay/common[v3.0.0]. - omnipay/common v3.0.0 requires php-http/client-implementation ^1 -> could not be found in any version, but the following packages provide it: - symfony/http-client Provides powerful methods to fetch HTTP resources synchronously or asynchronously
- php-http/guzzle6-adapter Guzzle 6 HTTP Adapter - symfony/symfony The Symfony PHP framework - php-http/curl-client PSR-18 and HTTPlug Async client with cURL - php-http/guzzle7-adapter Guzzle 7 HTTP Adapter - kriswallsmith/buzz Lightweight HTTP client - php-http/mock-client Mock HTTP client - php-http/socket-client Socket client for PHP-HTTP - php-http/guzzle5-adapter Guzzle 5 HTTP Adapter - voku/httpful A Readable, Chainable, REST friendly, PHP HTTP Client - php-http/react-adapter React HTTP Adapter - christophwurst/nextcloud-http-client HTTPlug and PSR7 adapter for Nextcloud - jorge-matricali/http-client A wrapper of libcurl that implements PSR-7 HTTP message interface. - code-tool/curl-client cURL client - juststeveking/http-slim A slim psr compliant http client to provide better interoperability. - php-http/buzz-adapter Buzz HTTP Adapter - code-tool/socket-client Socket client for PHP-HTTP - php-http/cakephp-adapter Cake adapter for PHP-HTTP - windwalker/framework The next generation PHP framework. - windwalker/http Windwalker Http package ... and 36 more. Consider requiring one of these to satisfy the php-http/client-implementation requirement.

Potential causes:

souravdutt avatar Aug 10 '22 08:08 souravdutt