Hi guys am getting a php fatal error while running my Laravel Project in Composer, I cannot run any php artisan commands without getting errors

Viewed 34

Am getting a php fatal error while running my Laravel Project in Composer, I cannot run any php artisan commands without getting errors. This is the error am getting.

$ php artisan
PHP Fatal error:  During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::of
fsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Projects\Duffengi\duffengi\duffengi\vendor\laravel\framework
\src\Illuminate\Support\Collection.php:1277
Stack trace:
#0 C:\Projects\Duffengi\duffengi\duffengi\vendor\laravel\framework\src\Illuminate\Support\Collection.php(11): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 C:\Projects\Duffengi\duffengi\duffengi\vendor\composer\ClassLoader.php(444): include('...')
#2 C:\Projects\Duffengi\duffengi\duffengi\vendor\composer\ClassLoader.php(322): Composer\Autoload\includeFile()
#3 C:\Projects\Duffengi\duffengi\duffengi\vendor\laravel\framework\src\Illuminate\Support\helpers.php(109): Composer\Autoload\ClassLoader->loadClass()
#4 C:\Projects\Duffengi\duffengi\duffengi\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(89): collect()
#5 C:\Projects\Duffengi\duffengi\duffengi\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(78): Illuminate\Foundation\PackageManifest->config()
#6 C:\Projects\Duffengi\duffengi\duffengi\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\RegisterFacades.php(26): Illuminate\Foundation\PackageManifest->aliases()
#7 C:\Projects\Duffengi\duffengi\duffengi\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(219): Illuminate\Foundation\Bootstrap\RegisterFacades->bootstrap()
#8 C:\Projects\Duffengi\duffengi\duffengi\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(320): Illuminate\Foundation\Application->bootstrapWith()
#9 C:\Projects\Duffengi\duffengi\duffengi\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(129): Illuminate\Foundation\Console\Kernel->bootstrap()
#10 C:\Projects\Duffengi\duffengi\duffengi\artisan(37): Illuminate\Foundation\Console\Kernel->handle()
#11 {main} in C:\Projects\Duffengi\duffengi\duffengi\vendor\laravel\framework\src\Illuminate\Support\Collection.php on line 11

In Collection.php line 11:

  During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mi
  xed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Projects\Duffengi\duffengi\duffengi\vendor\laravel\framework\src\Ill
  uminate\Support\Collection.php:1277
  Stack trace:
  #0 C:\Projects\Duffengi\duffengi\duffengi\vendor\laravel\framework\src\Illuminate\Support\Collection.php(11): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
  #1 C:\Projects\Duffengi\duffengi\duffengi\vendor\composer\ClassLoader.php(444): include('...')
  #2 C:\Projects\Duffengi\duffengi\duffengi\vendor\composer\ClassLoader.php(322): Composer\Autoload\includeFile()
  #3 C:\Projects\Duffengi\duffengi\duffengi\vendor\laravel\framework\src\Illuminate\Support\helpers.php(109): Composer\Autoload\ClassLoader->loadClass()
  #4 C:\Projects\Duffengi\duffengi\duffengi\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(89): collect()
  #5 C:\Projects\Duffengi\duffengi\duffengi\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(78): Illuminate\Foundation\PackageManifest->config()
  #6 C:\Projects\Duffengi\duffengi\duffengi\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\RegisterFacades.php(26): Illuminate\Foundation\PackageManifest->aliases()
  #7 C:\Projects\Duffengi\duffengi\duffengi\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(219): Illuminate\Foundation\Bootstrap\RegisterFacades->bootstrap()
  #8 C:\Projects\Duffengi\duffengi\duffengi\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(320): Illuminate\Foundation\Application->bootstrapWith()
  #9 C:\Projects\Duffengi\duffengi\duffengi\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(129): Illuminate\Foundation\Console\Kernel->bootstrap()
  #10 C:\Projects\Duffengi\duffengi\duffengi\artisan(37): Illuminate\Foundation\Console\Kernel->handle()
  #11 {main}
Thanks in advance

0 Answers
Related