百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
E

extension-installer

> 编程语言
开源

用于自动安装 PHPStan 扩展的 Composer 插件。

508 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

用于自动安装 PHPStan 扩展的 Composer 插件。

PHPStan Extension Installer

Composer plugin for automatic installation of PHPStan extensions.

Motivation

…

Usage

bash
composer require --dev phpstan/extension-installer

Starting 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.

Instructions for extension developers

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:

json
{
  "extra": {
    "phpstan": {
      "includes": [
        "extension.neon"
      ]
    }
  }
}

Console output

After each composer install or composer update, the plugin reports per-package status when the configuration changes:

  • installed — the extension was successfully registered.
  • not supported — a package has 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.
  • ignored — the extension was skipped due to the ignore list (see below).

Ignoring a particular extension

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:

json
{
  "extra": {
    "phpstan/extension-installer": {
      "ignore": [
        "phpstan/phpstan-phpunit"
      ]
    }
  }
}

Limitations

The extension installer depends on Composer script events, therefore you cannot use --no-scripts flag.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHPphpstanphpstan-extension

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言