You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any ideas? phpstan version is 0.11.19, latest DVWA and oroinc/phpstan-rules from master
~/Development/DVWA-master$ phpstan analyze --debug -l 7 -c /home/testdev4/Development/phpstan-rules/rules.neon -a /home/testdev4/Development/phpstan-rules/vendor/autoload.php *.php
/home/testdev4/Development/DVWA-master/about.php
PHP Fatal error: Uncaught Error: Call to a member function getName() on null in /home/testdev4/Development/phpstan-rules/src/Oro/Rules/Methods/QueryBuilderInjectionRule.php:388
Stack trace:
#0 /home/testdev4/Development/phpstan-rules/src/Oro/Rules/Methods/QueryBuilderInjectionRule.php(567): Oro\Rules\Methods\QueryBuilderInjectionRule->isUnsafeVariable(Object(PhpParser\Node\Expr\Variable), Object(PHPStan\Analyser\Scope)) #1 /home/testdev4/Development/phpstan-rules/src/Oro/Rules/Methods/QueryBuilderInjectionRule.php(490): Oro\Rules\Methods\QueryBuilderInjectionRule->isUnsafe(Object(PhpParser\Node\Expr\Variable), Object(PHPStan\Analyser\Scope)) #2 /home/testdev4/Development/phpstan-rules/src/Oro/Rules/Methods/QueryBuilderInjectionRule.php(572): Oro\Rules\Methods\QueryBuilderInjectionRule->isUnsafeArrayDimFetch(Object(PhpParser\Node\Expr\ArrayDimFetch), Object(PHPStan\Analyser\Scope)) #3 /home/testdev4/Development/phpstan-rules/src/Oro/Rules/Methods/QueryBuilderInjectionRule.php(372): Oro\Rules\Methods\QueryBuilderInjectionRule->isUns in /home/testdev4/Development/phpstan-rules/src/Oro/Rules/Methods/QueryBuilderInjectionRule.php on line 388
The text was updated successfully, but these errors were encountered:
ℹ️ 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
The text was updated successfully, but these errors were encountered: