从v4.0升级Laravel Spark到v5.0

时间:2018-06-15 08:54:42

标签: php laravel laravel-spark

我将我的应用程序从Laravel v5.4升级到v5.5。我需要将Laravel Spark从v4.0升级到v5.0,因为Spark 5.0是Spark应用程序的免费升级,并提供与Laravel 5.5的兼容性。

升级Spark的最佳和最简单的方法是通过Spark CLI

php artisan spark:update --major

但是由于Spark v6.0可用,而不是从Spark v5.0或更低版本免费升级,我收到以下错误:

In RequestException.php line 113:

  Client error: `GET https://spark.laravel.com/api/releases/6.0.10/download?api_token=<redacted>` resulted in a `403 Forbidden` response:
  {
      "message": ""
  }

当我尝试使用composer升级时,通过升级composer.json文件中的依赖项并运行composer update命令:

"laravel/spark": "~5.0"

我收到以下错误:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package laravel/spark ~5.0 exists as laravel/spark[4.0.x-dev, dev-master] but these are rejected by your constraint.

在Spark doc中,它说“如果你通过spark CLI工具安装Spark,你可以运行spark:update Artisan命令”和“如果你通过Composer安装Spark,你可能只是升级你的依赖在您的composer.json文件中运行composer update命令:“。我不记得我是否通过spark CLI工具或Composer安装了Spark,但看起来我使用了spark CLI工具。第二个错误可能是因为我在安装Spark时使用了spark CLI工具,因为使用composer进行安装或更新需要将更多代码添加到composer.json文件中。所以,我替换了以下

"repositories": [
    {
        "type": "path",
        "url": "./spark"
    }
]

"repositories": [
    {
        "type": "composer",
        "url": "https://spark-satis.laravel.com"
    }
]

在此修改之后,当我尝试运行composer update时,出现以下错误:

  - Removing laravel/spark (dev-master)
  - Installing laravel/spark (v5.0.3): Downloading (failed)    Failed to download laravel/spark from dist: The "https://api.github.com/repos/laravel/spark/zipball/cb75558d1243be5e08f4932d01383ef123d1fb05" file could not be downloaded (HTTP/1.1 404 Not Found)
    Now trying to download from source

如何将Spark从v4.0升级到v5.0?

0 个答案:

没有答案