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.xmlfile in your project directory. -
Edit the
php.xmlfile to include the path tophpstan.phar:Add the following path inside the
<include_path>section:<path value="$PROJECT_DIR$/vendor/phpstan/phpstan/phpstan.phar" />