yii2support
yii2support copied to clipboard
Using array element as array value breaks parsing
What steps will reproduce the problem?
<?php
$working = 'test';
$notWorking = ['one', 'two', 'tree'];
$test = [$notWorking[0]];
Create new scratch PHP file with the code above and click on $notWorking
variable, notice that the variable is not highlighted and also Refactor -> Rename
doesn't work.
What is the expected result?
Variable is highlighted and Refactor -> Rename
works
What do you get instead?
Variable not highlighted and Refactor -> Rename
doesn't do anything
Initially I though it was a PhpStorm issue, but after reporting it to JetBrains https://youtrack.jetbrains.com/issue/WI-64734 it was concluded that it is a yii2support plugin bug.
https://user-images.githubusercontent.com/7765070/147915726-1fb8b3d3-aee5-4fe4-b96f-dbd2c0b65e9d.mp4
Additional info
Q | A |
---|---|
IDE Name | PhpStorm |
IDE Version | 2021.3.1 RC (Build #PS-213.6461.58, built on December 23, 2021) |
Plugin version | 0.10.58.37 |
Yii App Template | advanced (but does it matter if bug can be replicated in a scratch file?) |
I tried this yii2support build: https://github.com/nvlad/yii2support/pull/270#issuecomment-982874073 (drag & drop the .zip file into IDE to apply the update)
It fixed my problem. PhpStorm 2021.3.3