0

I am having the following error in my laravel log file:

[2023-08-23 18:43:58] laravel.EMERGENCY: Unable to create configured logger. Using emergency logger. {"exception":"[object] (Error(code: 0): Class \"Illuminate\\Support\\Collection\" not found at /Users/joaopedrogomes/sites/project/vendor/laravel/framework/src/Illuminate/Support/helpers.php:109)
[stacktrace]
[2023-08-23 18:43:58] laravel.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 /Users/joaopedrogomes/sites/project/vendor/laravel/framework/src/Illuminate/Support/Collection.php:1277
Stack trace:

I tried updating the dependencies and deleting the vendor folder

  • The second error is a bit more important. See https://stackoverflow.com/questions/72515283/inheritance-of-arrayaccess-uncaught-errorexception-collectionoffsetexistsk – aynber Aug 25 '23 at 17:09
  • Are you running in a docker container? Is the container on PHP 7 and your host machine on 8? I'm not suggesting the host machine being on 8 is part of the issue, it's just what I have configured and I'm getting the same errors repeatedly appearing in my log file – Jon White Aug 26 '23 at 06:33
  • Also what version of Laravel is your project on? – Jon White Aug 26 '23 at 06:42
  • I think: You're on Laravel version 8. You're running your app in a docker container on PHP version 7. Your host machine is on PHP 8. Your app is mostly working but your logs are getting these errors every minute. You use VSCode as your IDE. Am I right? – Jon White Aug 26 '23 at 08:19

0 Answers0