当我运行composer update
时,我在作曲家方面遇到了问题。
我的composer.json
文件的相关部分如下所示:
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"omnipay/common": "~2.0",
"omnipay/authorizenet": "~2.0",
"omnipay/firstdata": "~2.0",
"omnipay/stripe": "~2.0",
"omnipay/paypal": "~2.0"
},
"minimum-stability": "dev",
当我运行composer update
时,我收到以下错误:
[ComposerDependencyResolverSolverProblemsException]
Problem 1
- The requested package omnipay/common could not be found in any version, there may be a typo in the package name.
Problem 2
- Installation request for omnipay/authorizenet ~2.0 -> satisfiable by omnipay/authorizenet[2.5.0].
- omnipay/authorizenet 2.5.0 requires omnipay/common ~2.2 -> no matching package found.
Problem 3
- Installation request for omnipay/firstdata ~2.0 -> satisfiable by omnipay/firstdata[v2.3.0].
- omnipay/firstdata v2.3.0 requires omnipay/common ~2.0 -> no matching package found.
Problem 4
- Installation request for omnipay/stripe ~2.0 -> satisfiable by omnipay/stripe[v2.4.3].
- omnipay/stripe v2.4.3 requires omnipay/common ~2.0 -> no matching package found.
Problem 5
- Installation request for omnipay/paypal ~2.0 -> satisfiable by omnipay/paypal[v2.6.3].
- omnipay/paypal v2.6.3 requires omnipay/common ~2.0 -> no matching package found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details. Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
我不知道该采取什么方向来解决这个问题,或者为什么它首先发生。 我上次运行作曲家更新是在几个月前,它运行没有问题。
没有必要特别要求 omnipay/common 或 omnipay/omnipay(无论如何,这是一个虚拟包(。
(1(从作曲家.json中删除所有Omnipay/*行
(2(你需要的作曲家命令,使你的composer.json拥有正确的版本是:
composer require omnipay/authorizenet
composer require omnipay/firstdata
composer require omnipay/stripe
composer require omnipay/paypal
尝试运行此命令,我认为作曲家会更新您的依赖项。
composer require omnipay/omnipay
我想问题出在包名称上。您可以在 composer.json 文件中添加 omnipay/omnipay 作为包名称。
我希望你读一次所有错误。找不到或未获得其声明的所有包或其所需的更新 因此,只需从Coposer.json
中删除所有omipay packge
,然后从ServiceProvider
中删除config/app.php
示例 删除此代码表单 Composer.json
"omnipay/common": "~2.0",
"omnipay/authorizenet": "~2.0",
"omnipay/firstdata": "~2.0",
"omnipay/stripe": "~2.0",
"omnipay/paypal": "~2.0"
然后尝试更新您的Composer
,然后从这里安装新版本包
我希望它对你有用!
或
遵循这个:
然后从 再次安装软件包:
https://packagist.org/packages/omnipay/paypal
和
https://github.com/thephpleague/omnipay-paypal