我正在嘗試使用 laravel 8 和 watson api 創建一座橋,但我遇到了以下錯誤,請在這里幫助我
composer require findbrok/php-watson-api-bridge
Using version ^1.1 for findbrok/php-watson-api-bridge
./composer.json has been updated
Running composer update findbrok/php-watson-api-bridge
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- findbrok/php-watson-api-bridge 1.1.x-dev requires illuminate/support ~5.0 -> found illuminate/support[v5.0.0, ..., 5.8.x-dev] but these were not loaded, likely because it conflicts with another require.
- findbrok/php-watson-api-bridge[dev-master, v1.1.0, ..., v1.1.2] require guzzlehttp/guzzle 6.2.* -> found guzzlehttp/guzzle[6.2.0, 6.2.1, 6.2.2, 6.2.3] but it conflicts with your root composer.json require (^7.0.1).
- findbrok/php-watson-api-bridge 1.2.x-dev is an alias of findbrok/php-watson-api-bridge dev-master and thus requires it to be installed too.
- Root composer.json requires findbrok/php-watson-api-bridge ^1.1 -> satisfiable by findbrok/php-watson-api-bridge[v1.1.0, ..., 1.2.x-dev (alias of dev-master)].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to
specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.```
uj5u.com熱心網友回復:
看起來這個包是舊的,不再維護。問題是 Laravel 8 安裝了版本 7 的 Guzzle Http。但是您嘗試安裝的軟體包在版本 6 之前與 Guzzle 兼容。
您可以在根 composer.json 中降級 Guzzle,但我不會推薦它。它可能會破壞框架。另一個解決方案是嘗試對包進行 PR 以使其與 Laravel 8 兼容,或者使用 Laravel 版本 7
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/317432.html
