August 2022 (version 1.67)
Welcome to the August 2022 release of PHP Tools for Visual Studio!
To-Do on Dark Theme
This release improves and updates the color scheme of to-do comments on Dark Theme. It makes the caret navigation more readable.
In case you missed it, PHP Tools in Visual Studio highlights to-do comments in your code. You can also always access the list of all the to-do's in the Task List pane (in
Code Completion has several neat new features and improvements to make the daily tasks easier.
- More precise
statictype resolve, especially when defined in
- Variadic parameters are handled correctly. We have also added code analysis and type checks for variadic parameters.
- Tooltips shows cleaner information. There are fixes in the case of trait aliased methods.
- Overall improvements in type analysis.
- Not reporting correctly used
$thisin template files.
- Improves resolving of corresponding
userespects the already existing alias with the same name.
Auto-Importing of a namespace avoids creating conflict names in
enums are now correctly handled. It is not a well-known feature, that there are implicit members always defined on an
enum type and its cases. IntelliSense shows the implicit
enum members in the list, and type analysis respects the implicit
enum member types.
Strict Types Checking
Newly, the code diagnostic respects the
strict_types directive. Whenever there is
declare(strict_types=1); code at the top of the source file, implicit numeric conversions are treated strictly. Any conversion that would reduce the value precision is reported as a warning.
Unknown Property Diagnostic and Code Fix (
The code diagnostic for unknown properties has been introduced. In case there is no magic
__get() method, and it is not a
stdClass, the unknown property is reported in the editor, and the error list. Eventually, a quick code action is provided, allowing to quickly insert the correct property name, if it can be inferred at the moment.
The quick code action fixes common typos and fixes letter casing.
Namespace Declaration Correctness (
We have added a code diagnostic that validates the use of
namespace and other statements in the global code. Also, it checks the user is not mixing short and long
Class Name Correctness (
There must not be the same class names defined. The editor was already checking for that. Newly, it also checks aliases introduced with
use statement in combination with classes inside the current namespace. This reports names of
classes conflicting with a name already specified in a
The PHP Editor is getting a new feature called Code Compose. It is also known as inline suggestion. The editor is guessing the next word or a sequence of words you might type according to the context.
The suggestion is shown dimmed right in the code and can be confirmed with
This will be extended in future releases for more cases and suggestions.
There are number of fixes and small improvements as well:
- Fix: unused
usenot reported twice.
- Fixes word occurence highlighting stopped working.
Ctrl+F5(run without debug) allows ignoring issues about Xdebug.
F12(go to def) on an include/require navigates to the file.
- Several localized texts have fixed punctuation.
- Fixes code completion exception on VS 2022 (
- Memory optimizations.
- Internal fixes.