Open testdev4 opened 4 years ago
Steps to reproduce:
export PATH=$PATH:$HOME/.config/composer/vendor/bin composer require phpstan/phpstan
cd ~/Development git clone git@github.com:oroinc/phpstan-rules.git cd ~/Development/phpstan-rules composer install
git clone git@github.com:ethicalhack3r/DVWA.git cd ~/Development/DVWA-master composer install phpstan analyze --debug -c ~/Development/phpstan-rules/rules.neon -a ~/Development/phpstan-rules/vendor/autoload.php .
:information_source: The error occurs as soon as you are analyzing a non-class context. The isUnsafeVariable
method wrongly assumes to be in a class context, even if it is not, resulting in the error described above. This also occurs on Bundles install.php
scripts, e.g. WebsiteBundle::install.php
Any ideas? phpstan version is 0.11.19, latest DVWA and oroinc/phpstan-rules from master