Open PandarinDev opened 6 years ago
Any updates on this?
Is this still happening?
This is still happening for me. This error only seems to happen if you write php closing tags first, and then go back and write the namespace in.
<?php
?>
then the moment you type T
the error occurs:
<?php
namespace T
?>
I was on PHP v7.1.6 and was getting an undefined object error with the same tolerant-php-parser\src\Node.php
file. I just now updated to PHP v7.3.2 and got the same error as OP Invalid argument supplied for foreach()
. It seems like this is an issue with Microsoft/tolerant-php-parser.
Disclaimer: I'm using php-language-server with your VS Code extension, and I'm not 100% sure that it is a language server bug as it could be a problem in the extension. However, since the error is thrown by the language server I decided to open an issue on this project.
Platform: Windows 10 x64 Config:
php.executablePath
andphp.validate.executablePath
in VS Code settings are both set to where php.exe is on my system (using version 7.2, non-threadsafe x64).Whenever I try to use namespaces I get the following error:
Consistently reproducible on my system, I just have to open a .php file in VS Code and type the keyword namespace and the moment I write something after that I get a stacktrace similar to the above.
Thanks for your hard work, just wanted to let you know your tools are really useful to a lot of people. Cheers!