In the case of VS Code, classes loaded by autoload.php are prompted for Undefined type 'xxx'.intelephense (1009)

Viewed 38
require 'vendor/autoload.php';
$user = new \WeChat\User();//Vs Code prompt: undefined type '\WeChat\User'. intelephense(1009)
var_dump($user);

During the debugging of Lanuch currently open script, he also made an error.

but directly executed:

php demo.php //he doesn't have any problems.

I can't debug autoload.php-loaded classes properly in VS Code, but there's nothing wrong with it in practice.

By the way, I installed PHP intelephense And php7.4.

0 Answers
Related