Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

debiprasad's avatar

Upgrading Laravel Spark to v5.0 from v4.0

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=sI9IYDpF4qRWZ9UmOaOsicUzSEOFmGRk3rmLeh7QIZYfpc2vEi9LrcSPUoVP` 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?

0 likes
2 replies
Cronix's avatar

In your browser, can you visit the spark v1-5 repo? http://github.com/laravel/spark

Usually when you can't access the repo via composer, like your error is showing, it's because you don't have your keys set up for github in your spark account settings.

1 like
TPRAsh's avatar

I had the same issue, I forgot about the Github stuff needing to connect to the spark repo.

Thanks Cronix, that fix worked for me.

Please or to participate in this conversation.