phpstan/extension-installer
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
phpstan/phpstan | 1.10.67 | - | MIT | prod |
The phpstan/extension-installer is a Composer plugin designed for the automatic installation of PHPStan extensions. PHPStan is a static analysis tool for PHP which helps catch potential issues in code without running it. The extension installer significantly simplifies the process of adding extensions to your project enabling automatic configuration updating so you don't have to manually modify your PHPStan configuration file each time you add or remove an extension.
To use the phpstan/extension-installer, first, you need to add it your project using Composer. This can be done by running the following command in your terminal:
composer require --dev phpstan/extension-installer
Starting from Composer 2.2.0, a question about the execution permission for the plugin will appear. You should respond with 'y' to grant execution permission to the plugin.
You can instruct the installer to ignore certain extensions if you'd like to handle those manually. This can be achieved by adding an extra.phpstan/extension-installer.ignore
array in your composer.json
file:
{
"extra": {
"phpstan/extension-installer": {
"ignore": [
"phpstan/phpstan-phpunit"
]
}
}
}
Please note that you cannot use the --no-scripts
flag with Composer when using this extension installer as it relies on Composer script events.
The official plugin documentation can be found on the GitHub page of the phpstan/extension-installer. Another valuable source of information is the PHPStan website. These sources provide comprehensive guides and examples to effectively utilize the extension installer, PHPStan, and the respective extensions.