Home > OS >  Why does Visual Studio Code mark a false error in my PHP script?
Why does Visual Studio Code mark a false error in my PHP script?

Time:04-27

Everything is running well but I ‘m still getting this red underline in the scripts. Any one to explain why and how to remove it? enter image description here

CodePudding user response:

Switch to using the Inteliphense plugin.

The built in PHP language features have issues with some PHP features. Your code is validated under Inteliphense.

Remove any other PHP intellisense plugins.

Make sure that you have followed the Inteliphense instructions when you install it, specifically:

  • Go to Extensions.
  • Search for @builtin php
  • Disable PHP Language Features. Leave PHP Language Basics enabled for syntax highlighting.

CodePudding user response:

Try this

use App\Domaine\ {
   User\User,
   Forem\Mesage};
  • Related