PHP Fatal error: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Support\Collection.php:1693 Stack trace: #0 C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Support\Collection.php(19): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8192, 'Return type of ...', 'C:\laragon\www\...', 1693) #1 C:\laragon\www\ultraboxx\vendor\composer\ClassLoader.php(444): include('C:\laragon\www\...') #2 C:\laragon\www\ultraboxx\vendor\composer\ClassLoader.php(322): Composer\Autoload\includeFile('C:\laragon\www\...') #3 C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Support\helpers.php(423): Composer\Autoload\ClassLoader->loadClass('Illuminate\Supp...') #4 C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(80): collect(Array) #5 C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\RegisterFacades.php(26): Illuminate\Foundation\PackageManifest->aliases() #6 C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(213): Illuminate\Foundation\Bootstrap\RegisterFacades->bootstrap(Object(Illuminate\Foundation\Application)) #7 C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(296): Illuminate\Foundation\Application->bootstrapWith(Array) #8 C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(119): Illuminate\Foundation\Console\Kernel->bootstrap() #9 C:\laragon\www\ultraboxx\artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #10 {main} in C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Support\Collection.php on line 19 PHP Fatal error: Uncaught ErrorException: Method ReflectionParameter::getClass() is deprecated in C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Container\Container.php:811 Stack trace: #0 C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Container\Container.php(811): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8192, 'Method Reflecti...', 'C:\laragon\www\...', 811) #1 C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Container\Container.php(779): Illuminate\Container\Container->resolveDependencies(Array) #2 C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Container\Container.php(631): Illuminate\Container\Container->build('App\Exceptions\...') #3 C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Container\Container.php(586): Illuminate\Container\Container->resolve('App\Exceptions\...', Array) #4 C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(732): Illuminate\Container\Container->make('App\Exceptions\...', Array) #5 C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Container\Container.php(256): Illuminate\Foundation\Application->make('App\Exceptions\...', Array) #6 C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Container\Container.php(749): Illuminate\Container\Container->Illuminate\Container{closure}(Object(Illuminate\Foundation\Application), Array) #7 C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Container\Container.php(631): Illuminate\Container\Container->build(Object(Closure)) #8 C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Container\Container.php(586): Illuminate\Container\Container->resolve('Illuminate\Cont...', Array) #9 C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(732): Illuminate\Container\Container->make('Illuminate\Cont...', Array) #10 C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(159): Illuminate\Foundation\Application->make('Illuminate\Cont...') #11 C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(101): Illuminate\Foundation\Bootstrap\HandleExceptions->getExceptionHandler() #12 C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(87): Illuminate\Foundation\Bootstrap\HandleExceptions->renderForConsole(Object(ErrorException)) #13 C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(123): Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(Object(ErrorException)) #14 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleShutdown() #15 {main} thrown in C:\laragon\www\ultraboxx\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 811
This error is in my vs code. And I don't know how to solve it I have a task here in PHP - Laravel when I try to use php artisan serve or any commands in laravel it will appear.
I used newer version of php and laravel. And this project is made in older version of php and laravel. Help me to find a solution so I can run this using php artisan serve. Thanks