用于自动安装 PHPStan 扩展的 Composer 插件。
Composer plugin for automatic installation of PHPStan extensions.
…composer require --dev phpstan/extension-installerStarting from Composer 2.2.0 you'll get the following question:
phpstan/extension-installer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "phpstan/extension-installer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?]Answer with y to allow the plugin.
It's best (but optional) to set the extension's composer package type to phpstan-extension for this plugin to be able to recognize it and to be discoverable on Packagist.
Add phpstan key in the extension composer.json's extra section:
{
"extra": {
"phpstan": {
"includes": [
"extension.neon"
]
}
}
}After each composer install or composer update, the plugin reports per-package status when the configuration changes:
phpstan in its name but is not configured as a PHPStan extension (missing the phpstan-extension type and extra.phpstan key). This may indicate the package requires manual includes configuration.You may want to disable auto-installation of a particular extension to handle installation manually. Ignore an extension by adding an extra.phpstan/extension-installer.ignore array in composer.json that specifies a list of packages to ignore:
{
"extra": {
"phpstan/extension-installer": {
"ignore": [
"phpstan/phpstan-phpunit"
]
}
}
}The extension installer depends on Composer script events, therefore you cannot use --no-scripts flag.
暂无开放 Issues,或尚未同步最近议题。