Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
E

extension-installer

> 编程语言
Open source

Composer plugin for automatic installation of PHPStan extensions.

508 stars0 likes2 views
WebsiteGitHub

About

Composer plugin for automatic installation of PHPStan extensions.

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 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHPphpstanphpstan-extension

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

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