I upgraded my application from Laravel v5.4 to v5.5. I need to upgrade Laravel Spark from v4.0 to v5.0 as Spark 5.0 is a free upgrade for Spark applications and provides compatibility with Laravel 5.5.
The best and easiest way to upgrade Spark is via Spark CLI
php artisan spark:update --major
But as Spark v6.0 is available which is not a free upgrade from Spark v5.0 or lower, I get the following error:
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": ""
}
When I try to upgrade using composer by upgrading the dependency in my composer.json
file and run the composer update
command:
"laravel/spark": "~5.0"
I get the following error:
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.
In the Spark doc, it says "If you installed Spark via the spark CLI tool, you may run the spark:update Artisan command" and "If you installed Spark via Composer, you may simply upgrade your dependency in your composer.json file and run the composer update command:". I don't remember whether I had installed Spark via the spark CLI tool or Composer, but it looks like I had used the spark CLI tool. The second error could be because I had used the spark CLI tool while installing Spark as the installing or updating using composer needed few more code to be added to composer.json
file. So, I replaced the following
"repositories": [
{
"type": "path",
"url": "./spark"
}
]
with
"repositories": [
{
"type": "composer",
"url": "https://spark-satis.laravel.com"
}
]
After this modification, when I try to run composer update
, I get the following error:
- 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
How can I upgrade Spark from v4.0 to v5.0?