PhpStorm might have issues indexing PHPStan due to .phar. To fix this, follow the steps below:
-
Open the Project in PhpStorm.
-
Locate the
.idea/php.xml
file in your project directory. -
Edit the
php.xml
file to include the path tophpstan.phar
:Add the following path inside the
<include_path>
section:<path value="$PROJECT_DIR$/vendor/phpstan/phpstan/phpstan.phar" />