There have been a lot of updates and improvements to PHP Tools on VS Code. Check what's new and how it can help you with your PHP projects.
In short, there is the support for PHP 8.0 syntax, new diagnostics, quick fixes, improved tooltips, support for "Go To Implementation" command, performance and code analysis improvements, PCRE syntax checker, Test Explorer improvements, and more.
VS Code introduces a useful command for quickly going to function overrides, interface implementors, or class sub-classes. It is fully supported and provides you workspace-wide search for implementations.
The code may be full of regullar expressions; and it's very easy to make a mistake. In addition to syntax highlighting, PHP Tools now validates the syntax for you and shows additional diagnostics in case anything may be wrong.
There is an upcoming big release of PHP 8.0. The editor now supports the entire PHP 8.0 syntax including:
try { .. } catch (Exception) { ... }
#[PhpAttribute]
?->
match
expressionthrow
expression::class
on objectsNote, in order to actually use the new syntax, you'll need the PHP 8.0 beta installed. Until then, the editor will report all the new features usage as problems.
We have added several new quick fixes for common problems, and also a few refactoring quick actions. Now you can generate getters and setters for properties, shorten class names if possible, or implement missing abstract functions or whole interfaces.
All the other fixes, new features, and improvements are listed in the changelog.