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

cjke7777's avatar

`spark new` no longer works for v5

If you haven't yet upgraded to a v6 license, you can no longer new up a spark install for v5.

For example:

spark new foobar

Responses with:

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

I monkey patched src/InteractsWithSparkAPI.php to return 5.0.3, but its not really ideal...

    protected function latestSparkRelease()
    {
        return '5.0.1';
/*
        return json_decode((string) (new HttpClient)->get(
            $this->sparkUrl.'/api/releases/version', ['verify' => __DIR__.'/cacert.pem']
        )->getBody())->version;
*/
    }
0 likes
4 replies
ZetecVan's avatar

I had this last night. That is exactly what I did to fix.

hatem_belkhiria's avatar

also edit spark-installer\src\Installation\CreateLaravelProject.php :

$process = new Process('composer create-project --prefer-dist laravel/laravel '.$this->name.' "5.5."'); to force it to install laravel 5.5.

beetuco's avatar

You can - but you need to replace your spark-installer repo with a copy of the v5 branch.

git clone -b 5.0 https://github.com/laravel/spark-installer

So what I did was instead cloned it to a new directory spark-installer-v5 and ran through the setup as per v5 docs.

git clone -b 5.0 https://github.com/laravel/spark-installer spark-installer-v5 

cd spark-installer-v5 

composer install

I then updated my PATH to reference the spark-installer-v5 directory instead of the previous one..

Reload Terminal\PS\WhateverYoureUsing and spark new works as expected.

Please or to participate in this conversation.