PHPStan extension IDE helper, provides dummy PHPStan namespace classes and functions.
PHPStan is distributed via PHAR file rather than pure PHP files. While this is perfectly adequate for using PHPStan, it makes writing PHPStan's extensions a pain. Most IDEs and autocompletion tools cannot reference the code inside PHAR packages.
composer require --dev headercat/phpstan-extension-ide-helperOr you can manually add into composer.json.
{
  "require-dev": {
    "phpstan/phpstan": "^2.0.0-or-any-version-you-want",
    "headercat/phpstan-extension-ide-helper": "*"
  }
}The job creating a new release will be automatically executed every each 30 minutes. But if PHPStan release a new version before next 30 minutes iteration occurs, you can write a comment on Issue #1 to execute the job manually.
- Clone 
phpstan/phpstan-srcrepository to/phpstan. - Scan all PHP files from 
/phpstan. - Add 
return;after namespace declaration to all scanned files from step 2. - Write them to a new directory 
/main. - Find composer dependencies that starts with 
phpstan/from/phpstan/composer.json. - Add them to 
/main/composer.json. - Done!
 
Licensed under the MIT license.