-4

I am getting this error while upgrading Laravel v7.30.6 to v8.0. and everything is working in my current version (v7.30.6)

@php artisan package:discover --ansi
PHP Fatal error:  Declaration of App\Providers\SparkServiceProvider::booted() must be compatible with Illuminate\Support\ServiceProvider::booted(Closure $callback) in /myproject/app/Providers/SparkServiceProvider.php on line 55

Can anyone please help me?

enter image description here

ajay
  • 1
  • 1
  • 1
    The error is self explanatory, you have `SparkServiceProvider`'s `booted` method, and the method's signing is different on Laravel 8... – matiaslauriti Dec 28 '22 at 20:02
  • 1. Please don't upload screenshots of error messages; 2. We can't see your code, so we can't help you fix it (at least [edit] your question to include the contents of your composer.json file for us); 3. In your screenshot, there's an error mentioning Airbrake/Notifier.. so that'd be a great place to start looking at it in order to solve your problem. It's probably incompatible with Laravel 8, so you might need to upgrade that library. I'd also suggest upgrading to Laravel 9 while you're at it (assuming all libraries are compatible). – Kirk Beard Dec 30 '22 at 06:21
  • Only problem with laravel/spark-aurelius:"*@dev" library when i remove it, laravel version upgraded but spark functionality broken – ajay Dec 30 '22 at 12:31

1 Answers1

1

I ll advise you go through the upgrade guide of spark. see https://spark-classic.laravel.com/docs/6.0/upgrade