LaravelShoppingcart不laravel5.6工作

问题描述 投票:0回答:1

当我想安装LaravelShoppingcart,与作曲家:

$ composer require gloudemans/shoppingcart

这回errors.Because作曲家更新laravel版本5.5到5.6和我的购物不起作用5.6 yet.How我可以安装这个包不要更新作曲家?

php laravel laravel-5 composer-php shopping-cart
1个回答
1
投票

你要么需要使用Laravel 5.5或叉子包装和凹凸的版本依赖自己:

// composer.json, 5.5 is the highest supported version
"require": {
    "illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*",
    "illuminate/session": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*",
    "illuminate/events": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*"
},

有一个地方路过的拉动请求,但:

https://github.com/Crinsane/LaravelShoppingcart/pull/425

但是,如果您不能等待拉入请求被接受,这种变化是微不足道的。

叉包

  1. 更新composer.json"require": { "illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*", "illuminate/session": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*", "illuminate/events": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*" }, "require-dev": { "phpunit/phpunit": "~5.0|~6.0|~7.0", "mockery/mockery": "~0.9.0", "orchestra/testbench": "~3.1" },
  2. 提交更改。
  3. 创建新的分支的释放。

创建GitHub的释放

  1. 转到页为新的分支,然后单击版本

Click Releases

  1. 点击发新版本

enter image description here

  1. 给发布一个新版本(2.4.6将在下面的例子中使用)

enter image description here

  1. 点击发布

您现在可以在您的个人帐户GitHub的发行版本,你可以指示作曲家用于安装。

安装使用作曲家叉

在你composer.json的库部分添加公共GitHub的库:

// "repositories" may not exist in your composer.json file.
// add it as a sibling to "require"
"repositories": [
  {
    "type": "git",
    "url": "https://github.com/username/forked-repository"
  }
],

并加入到需要部分的条目:

// change the version - 2.4.6 - to match your fork's version
"require": {
  "username/forked-repository": "2.4.6"
}

您现在可以运行:

composer update

和叉将被安装在您的应用程序。

© www.soinside.com 2019 - 2024. All rights reserved.