简体   繁体   English

laravel 5作曲家更新无所不能

[英]laravel 5 composer update omnipay fails

I am having a problem with composer when I run composer update . 我在运行composer update时遇到了composer update的问题。

The relevant bits of my composer.json file looks like this: 我的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",

When I run composer update , I receive the following error: 当我运行composer update ,收到以下错误:

[Composer\DependencyResolver\SolverProblemsException]
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.

I'm at a loss as to what direction to take to fix this or why it occurred in the first place. 我不知道应该采取什么方向来解决这个问题,或者为什么它首先发生。 I last ran composer update several months ago and it ran with no issue. 几个月前我上次运行作曲家更新,它运行没有问题。

Try running this command, I think composer will update your dependencies. 尝试运行此命令,我认为composer将更新您的依赖项。

composer require omnipay/omnipay

I suppose the problem is with the package name. 我想问题是包名。 You can add omnipay/omnipay in your composer.json file as the package name. 您可以在composer.json文件中添加omnipay / omnipay作为包名称。

I hope You Read All The Error Once. 我希望你阅读所有错误一次。 Its All Package You Declare is not found or not getting or its required update So, Just Remove the All The omipay packge form the Coposer.json and also Remove from ServiceProvider in config/app.php 它所声明的所有包未找到或未获得或其所需的更新所以,只需删除所有的omipay packge形式Coposer.json以及从config/app.php ServiceProvider中删除

Example Remove This Code Form Composer.json 示例删除此代码表Composer.json

"omnipay/common": "~2.0",
"omnipay/authorizenet": "~2.0",
"omnipay/firstdata": "~2.0",
"omnipay/stripe": "~2.0",
"omnipay/paypal": "~2.0"

And Then Try To Update Your Composer and Then After Install New Version Package From Here 然后尝试更新您的Composer ,然后从此处安装新版本包

I Hope Its Work For Your !! 我希望它为你的工作!

Or 要么

Follow This : 关注此:

And Install The Package Again From : 并从以下位置再次安装包:

https://packagist.org/packages/omnipay/paypal https://packagist.org/packages/omnipay/paypal

And

https://github.com/thephpleague/omnipay-paypal https://github.com/thephpleague/omnipay-paypal

There's no need to specifically require omnipay/common or omnipay/omnipay (which is a dummy package anyway). 没有必要特别要求omnipay / common或omnipay / omnipay(无论如何都是虚拟包)。

(1) remove all of the omnipay/* lines from your composer.json (1)从composer.json中删除所有的omnipay / *行

(2) The composer commands you need to bring your composer.json into having the correct versions are: (2)你需要将composer.json带入正确版本的作曲家命令:

composer require omnipay/authorizenet
composer require omnipay/firstdata
composer require omnipay/stripe
composer require omnipay/paypal

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM