Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vscode error #111

Closed
ia-kaishen opened this issue Apr 25, 2024 · 1 comment
Closed

vscode error #111

ia-kaishen opened this issue Apr 25, 2024 · 1 comment

Comments

@ia-kaishen
Copy link

vscode will show got the Laravel Extra IntelliSense error periodically, even when nothing is type

In Collection.php line 11:
                                                                               
  During inheritance of ArrayAccess: Uncaught ErrorException: Return type of   
  Illuminate\Support\Collection::offsetExists($key) should either be compatib  
  le with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTyp  
  eWillChange] attribute should be used to temporarily suppress the notice in  
   /Users/involveasia/Backend/bg-worker-postback/vendor/laravel/framework/src  
  /Illuminate/Support/Collection.php:1277                                      
  Stack trace:                                                                 
  #0 /Users/involveasia/Backend/bg-worker-postback/vendor/laravel/framework/s  
  rc/Illuminate/Support/Collection.php(11): Illuminate\Foundation\Bootstrap\H  
  andleExceptions->handleError(8192, 'Return type of ...', '/Users/involvea..  
  .', 1277)                                                                    
  #1 /Users/involveasia/Backend/bg-worker-postback/vendor/composer/ClassLoade  
  r.php(576): include('/Users/involvea...')                                    
  #2 /Users/involveasia/Backend/bg-worker-postback/vendor/composer/ClassLoade  
  r.php(427): Composer\Autoload\{closure}('/Users/involvea...')                
  #3 /Users/involveasia/Backend/bg-worker-postback/vendor/laravel/framework/s  
  rc/Illuminate/Support/helpers.php(109): Composer\Autoload\ClassLoader->load  
  Class('Illuminate\\Supp...')                                                 
  #4 /Users/involveasia/Backend/bg-worker-postback/vendor/laravel/framework/s  
  rc/Illuminate/Foundation/PackageManifest.php(89): collect(Array)             
  #5 /Users/involveasia/Backend/bg-worker-postback/vendor/laravel/framework/s  
  rc/Illuminate/Foundation/PackageManifest.php(78): Illuminate\Foundation\Pac  
  kageManifest->config('aliases')                                              
  #6 /Users/involveasia/Backend/bg-worker-postback/vendor/laravel/framework/s  
  rc/Illuminate/Foundation/Bootstrap/RegisterFacades.php(26): Illuminate\Foun  
  dation\PackageManifest->aliases()                                            
  #7 /Users/involveasia/Backend/bg-worker-postback/vendor/laravel/framework/s  
  rc/Illuminate/Foundation/Application.php(219): Illuminate\Foundation\Bootst  
  rap\RegisterFacades->bootstrap(Object(Illuminate\Foundation\Application))    
  #8 /Users/involveasia/Backend/bg-worker-postback/vendor/laravel/framework/s  
  rc/Illuminate/Foundation/Console/Kernel.php(320): Illuminate\Foundation\App  
  lication->bootstrapWith(Array)                                               
  #9 /Users/involveasia/Backend/bg-worker-postback/vendor/laravel/framework/s  
  rc/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\Foundation\Con  
  sole\Kernel->bootstrap()                                                     
  #10 Command line code(1): Illuminate\Foundation\Console\Kernel->handle(Obje  
  ct(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Con  
  sole\Output\ConsoleOutput))                                                  
  #11 {main}                                                                   
                                                                               


2024-04-25 18:08:09.492 [error] Laravel Extra Intellisense Error:
 Application Models
@amir9480
Copy link
Owner

@ia-kaishen
If you don't change the default configuration, the extension will run default PHP in your environment and look like you are using an old version of PHP,
If you use docker for development, you should change default configurations to work properly on your machine.

https://github.com/amir9480/vscode-laravel-extra-intellisense#sample-config-to-use-docker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants