PHPackages                             laminas/laminas-component-installer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. laminas/laminas-component-installer

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

laminas/laminas-component-installer
===================================

Composer plugin for injecting modules and configuration providers into application configuration

3.8.0(1mo ago)304.4M↓31.8%11[6 issues](https://github.com/laminas/laminas-component-installer/issues)[2 PRs](https://github.com/laminas/laminas-component-installer/pulls)20BSD-3-ClausePHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Dec 31Pushed 1w ago14 watchersCompare

[ Source](https://github.com/laminas/laminas-component-installer)[ Packagist](https://packagist.org/packages/laminas/laminas-component-installer)[ Docs](https://laminas.dev)[ Fund](https://funding.communitybridge.org/projects/laminas-project)[ RSS](/packages/laminas-laminas-component-installer/feed)WikiDiscussions 3.9.x Synced 3d ago

READMEChangelog (10)Dependencies (16)Versions (62)Used By (20)

Component Installer for Laminas and Mezzio Applications
=======================================================

[](#component-installer-for-laminas-and-mezzio-applications)

[![Build Status](https://github.com/laminas/laminas-component-installer/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/laminas/laminas-component-installer/actions/workflows/continuous-integration.yml)[![type-coverage](https://camo.githubusercontent.com/07d58fd9d3fe6960eff1be7bbe69bd083d6bfc71140b6951d42434f31f0df58d/68747470733a2f2f73686570686572642e6465762f6769746875622f6c616d696e61732f6c616d696e61732d636f6d706f6e656e742d696e7374616c6c65722f636f7665726167652e737667)](https://shepherd.dev/github/laminas/laminas-component-installer)[![Psalm level](https://camo.githubusercontent.com/d6fb7a349052d89602338dd84a7245cf53f79932c29268447a17fdf476f4b589/68747470733a2f2f73686570686572642e6465762f6769746875622f6c616d696e61732f6c616d696e61732d636f6d706f6e656e742d696e7374616c6c65722f6c6576656c2e737667)](https://shepherd.dev/github/laminas/laminas-component-installer)

> ## 🇷🇺 Русским гражданам
>
> [](#-русским-гражданам)
>
> Мы, участники Laminas, родились и живем в разных странах. У многих из нас есть друзья, родственники и коллеги как в России, так и в Украине. Некоторые из нас родились в России. Некоторые из нас живут в России. У некоторых бабушки и дедушки сражались с фашистами во Второй мировой войне. Здесь никто не поддерживает фашизм.
>
> У одного из нас есть украинская родственница, которая спаслась из дома вместе с сыном. Поезд задержался из-за бомбежки на дороге впереди. У нас есть друзья, которые прячутся в бомбоубежищах. Мы с тревогой ждем весточки от них после воздушных налетов, которые беспорядочно наносят удары и попадают по больницам, школам, детским садам и домам. Мы не берем это из каких-либо СМИ. Мы наблюдаем это напрямую.
>
> Вы доверяете нам достаточно, чтоб использовать наши программы, и мы просим вас довериться нам вновь. Мы нуждаемся в помощи. Выходите и протестуйте против этой бесполезной войны. Остановите кровопролитие. Скажите "Нет войне!"
>
> ## 🇺🇸 To Citizens of Russia
>
> [](#-to-citizens-of-russia)
>
> We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism.
>
> One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences.
>
> You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say "stop the war!"

This repository contains the Composer plugin class `Laminas\ComponentInstaller\ComponentInstaller`, which provides Composer event hooks for the events:

- post-package-install
- post-package-uninstall

Via Composer global install
---------------------------

[](#via-composer-global-install)

To install the utility for use with all projects you use:

```
$ composer global require laminas/laminas-component-installer
```

Per project installation
------------------------

[](#per-project-installation)

To install the utility for use with a specific project already managed by composer:

```
$ composer require laminas/laminas-component-installer
```

Writing packages that utilize the installer
-------------------------------------------

[](#writing-packages-that-utilize-the-installer)

Packages can opt-in to the workflow from laminas-component-installer by defining one or more of the following keys under the `extra.laminas` configuration in their `composer.json` file:

```
"extra": {
  "laminas": {
    "component": "Component\\Namespace",
    "config-provider": "Classname\\For\\ConfigProvider",
    "module": "Module\\Namespace"
  }
}
```

- A **component** is for use specifically with laminas-mvc + laminas-modulemanager; a `Module` class **must** be present in the namespace associated with it. The setting indicates a low-level component that should be injected to the top of the modules list of one of:

    - `config/application.config.php`
    - `config/modules.config.php`
    - `config/development.config.php`
- A **module** is for use specifically with laminas-mvc + laminas-modulemanager; a `Module` class **must** be present in the namespace associated with it. The setting indicates a userland or third-party module that should be injected to the bottom of the modules list of one of:

    - `config/application.config.php`
    - `config/modules.config.php`
    - `config/development.config.php`
- A **config-provider** is for use with applications that utilize [laminas-config-aggregator](https://github.com/laminas/laminas-config-aggregator)(which may or may not be Mezzio applications). The class listed must be an invokable that returns an array of configuration, and will be injected at the top of:

    - `config/config.php`

Marking Packages to Auto-Install or to Be Ignored
-------------------------------------------------

[](#marking-packages-to-auto-install-or-to-be-ignored)

At the project level, you can mark packages that expose configuration providers and modules that you want to automatically inject via the `component-auto-installs`key or in case you might want to permanently ignore a component, ignore components via `component-ignore-list`:

```
{
  "extra": {
    "laminas": {
      "component-auto-installs": [
        "mezzio/mezzio",
        "mezzio/mezzio-helpers"
      ],
      "component-ignore-list": [
        "laminas/laminas-db"
      ]
    }
  }
}
```

This configuration must be made at the root package level (the package *consuming* configuration providing packages).

###  Health Score

72

—

ExcellentBetter than 100% of packages

Maintenance91

Actively maintained with recent releases

Popularity54

Moderate usage in the ecosystem

Community43

Growing community involvement

Maturity89

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~43 days

Recently: every ~62 days

Total

56

Last Release

13d ago

Major Versions

0.7.1 → 1.0.02019-12-31

1.1.1 → 2.0.02019-12-31

2.8.x-dev → 3.0.02022-07-05

PHP version history (9 changes)0.1.0PHP ^5.5 || ^7.0

0.3.0PHP ^5.6 || ^7.0

2.0.0PHP ^7.1

2.4.0PHP ^7.3 || ~8.0.0

2.6.0PHP ^7.4 || ~8.0.0 || ~8.1.0

3.1.0PHP ~8.0.0 || ~8.1.0 || ~8.2.0

3.4.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0

3.5.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0

3.7.0PHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25943?v=4)[Matthew Weier O'Phinney](/maintainers/weierophinney)[@weierophinney](https://github.com/weierophinney)

---

Top Contributors

[![weierophinney](https://avatars.githubusercontent.com/u/25943?v=4)](https://github.com/weierophinney "weierophinney (281 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (131 commits)")[![michalbundyra](https://avatars.githubusercontent.com/u/7423207?v=4)](https://github.com/michalbundyra "michalbundyra (95 commits)")[![boesing](https://avatars.githubusercontent.com/u/2189546?v=4)](https://github.com/boesing "boesing (88 commits)")[![Xerkus](https://avatars.githubusercontent.com/u/725842?v=4)](https://github.com/Xerkus "Xerkus (22 commits)")[![arueckauer](https://avatars.githubusercontent.com/u/1815979?v=4)](https://github.com/arueckauer "arueckauer (20 commits)")[![Ocramius](https://avatars.githubusercontent.com/u/154256?v=4)](https://github.com/Ocramius "Ocramius (13 commits)")[![laminas-bot](https://avatars.githubusercontent.com/u/68250880?v=4)](https://github.com/laminas-bot "laminas-bot (10 commits)")[![ghostwriter](https://avatars.githubusercontent.com/u/9754361?v=4)](https://github.com/ghostwriter "ghostwriter (10 commits)")[![geerteltink](https://avatars.githubusercontent.com/u/9497586?v=4)](https://github.com/geerteltink "geerteltink (9 commits)")[![malinink](https://avatars.githubusercontent.com/u/5726553?v=4)](https://github.com/malinink "malinink (9 commits)")[![gsteel](https://avatars.githubusercontent.com/u/2803720?v=4)](https://github.com/gsteel "gsteel (9 commits)")[![kpicaza](https://avatars.githubusercontent.com/u/1093654?v=4)](https://github.com/kpicaza "kpicaza (8 commits)")[![froschdesign](https://avatars.githubusercontent.com/u/103362?v=4)](https://github.com/froschdesign "froschdesign (6 commits)")[![Koopzington](https://avatars.githubusercontent.com/u/3015529?v=4)](https://github.com/Koopzington "Koopzington (5 commits)")[![stefanotorresi](https://avatars.githubusercontent.com/u/2952427?v=4)](https://github.com/stefanotorresi "stefanotorresi (5 commits)")[![samsonasik](https://avatars.githubusercontent.com/u/459648?v=4)](https://github.com/samsonasik "samsonasik (3 commits)")[![tylkomat](https://avatars.githubusercontent.com/u/815915?v=4)](https://github.com/tylkomat "tylkomat (3 commits)")[![adamturcsan](https://avatars.githubusercontent.com/u/6500048?v=4)](https://github.com/adamturcsan "adamturcsan (3 commits)")[![SlayerBirden](https://avatars.githubusercontent.com/u/1726160?v=4)](https://github.com/SlayerBirden "SlayerBirden (2 commits)")

---

Tags

hacktoberfestplugincomposerlaminascomponent installer

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/laminas-laminas-component-installer/health.svg)

```
[![Health](https://phpackages.com/badges/laminas-laminas-component-installer/health.svg)](https://phpackages.com/packages/laminas-laminas-component-installer)
```

###  Alternatives

[ergebnis/composer-normalize

Provides a composer plugin for normalizing composer.json.

1.1k41.5M2.8k](/packages/ergebnis-composer-normalize)[pyrech/composer-changelogs

Display changelogs after each composer update

5904.2M31](/packages/pyrech-composer-changelogs)[automattic/jetpack-autoloader

Creates a custom autoloader for a plugin or theme.

576.1M127](/packages/automattic-jetpack-autoloader)[vaimo/composer-patches

Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and patch command for testing/troubleshooting added patches.

3014.6M26](/packages/vaimo-composer-patches)[sllh/composer-versions-check

Checks if packages are up to date to last major versions after update

2392.4M16](/packages/sllh-composer-versions-check)[ffraenz/private-composer-installer

A composer install helper for private packages

2321.7M5](/packages/ffraenz-private-composer-installer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
