PHPackages                             magento/magento-composer-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. magento/magento-composer-installer

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

magento/magento-composer-installer
==================================

Composer installer for Magento modules

0.4.0(3y ago)7523.3M—4.9%51[9 PRs](https://github.com/magento/magento-composer-installer/pulls)20OSL-3.0PHP

Since Jul 16Pushed 2y ago41 watchersCompare

[ Source](https://github.com/magento/magento-composer-installer)[ Packagist](https://packagist.org/packages/magento/magento-composer-installer)[ Docs](https://github.com/magento/magento-composer-installer)[ RSS](/packages/magento-magento-composer-installer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (24)Used By (20)

Magento Composer Installer
==========================

[](#magento-composer-installer)

This is a fork of the [Magento Composer Installer](https://github.com/magento-hackathon/magento-composer-installer) repo that provides support for Magento 2 components (modules, themes, language packages, libraries and components).

Usage
-----

[](#usage)

In the component's `composer.json`, specify:

- `type`, type of Magento 2 component.
- `extra/map`, list of files to move and their paths relative to the Magento root directory.
- `extra/chmod`, list of permissions that should be set for files.

    **Note**:

    - `extra/map` is required only if your component needs to be moved to a location other than `/vendor`. Otherwise, omit this section.
    - `extra/chmod` is required only if you need to set specific permissions for files.

Supported Components
--------------------

[](#supported-components)

The following list explains the use of `type` in `composer.json`.

### Magento Module

[](#magento-module)

`"type": "magento2-module"`

Installation location: Default vendor directory or as defined in `extra/map`

Example:

```
{
    "name": "magento/module-core",
    "description": "N/A",
    "require": {
        ...
    },
    "type": "magento2-module",
    "extra": {
        "map": [
            [
                "*",
                "Magento/Core"
            ]
        ]
    }
}
```

Final location is `/app/code/Magento/Core`

### Magento Theme

[](#magento-theme)

`"type": "magento2-theme"`

Installation location: `app/design`

Example:

```
{
    "name": "magento/theme-frontend-luma",
    "description": "N/A",
    "require": {
        ...
    },
    "type": "magento2-theme",
    "extra": {
        "map": [
            [
                "*",
                "frontend/Magento/luma"
            ]
        ]
    }
}
```

Final location is `/app/design/frontend/Magento/luma`

### Magento Language Package

[](#magento-language-package)

`"type": "magento2-language"`

Installation location: `app/i18n`

Example:

```
{
    "name": "magento/language-de_de",
    "description": "German (Germany) language",
    "require": {
        ...
    },
    "type": "magento2-language",
    "extra": {
        "map": [
            [
                "*",
                "Magento/de_DE"
            ]
        ]
    }
}
```

Final location is `/app/i18n/Magento/de_DE`

### Magento Library

[](#magento-library)

`"type": "magento2-library"`

Support for libraries located in `lib/internal` instead of in the `vendor` directory.

Example:

```
{
    "name": "magento/framework",
    "description": "N/A",
    "require": {
       ...
    },
    "type": "magento2-library",
    "extra": {
        "map": [
            [
                "*",
                "Magento/Framework"
            ]
        ]
    }
}
```

Final location is `/lib/internal/Magento/Framework`

### Magento Component

[](#magento-component)

`"type": "magento2-component"`

Installation location: Magento root directory

Example:

```
{
    "name": "magento/migration-tool",
    "description": "N/A",
    "require": {
        ...
    },
    "type": "magento2-component",
    "extra": {
        "map": [
            [
                "*",
                "dev/tools/Magento/Tools/Migration"
            ]
        ]
    }
}
```

Final location is `/dev/tools/Magento/Tools/Migration`

Autoload
--------

[](#autoload)

After handling all Magento components, `/app/etc/vendor_path.php` specifies the path to your `vendor` directory.

This information allows the Magento application to utilize the Composer autoloader for any libraries installed in the `vendor` directory. The path to `vendor` varies between particular installations and depends on the `magento_root` setting for the Magento Composer installer. That's why it should be generated for each installation.

You must run `composer install` to install dependencies for a new application or `composer update` to update dependencies for an existing application.

Deployment Strategy
-------------------

[](#deployment-strategy)

The Magneto Composer Installer uses the `copy` deployment strategy. It copies each file or directory from the `vendor` directory to its designated location based on the `extra/map` section in the component's `composer.json`.

There are [other deployment strategies](https://github.com/magento/magento-composer-installer/blob/master/doc/Deploy.md) that could be used; however, we don't guarantee that any of them will work.

Usage `extra/chmod`
-------------------

[](#usage-extrachmod)

The following example shows how you can set specific permissions for files.

Example:

```
{
    "name": "magento/module-sample",
    "description": "N/A",
    "require": {
        ...
    },
    "type": "magento2-module",
    "extra": {
         "chmod": [
            {
                "mask": "0755",
                "path": "bin/magento"
            },
            {
                "mask": "0644",
                "path": "some_dir/file.jpg"
            }
        ]
    }
}
```

`mask` is a bit mask for chmod command

`path` is a path to file relative to the Magento root folder

Notes
=====

[](#notes)

- The extra-&gt;magento-root-dir option is no longer supported. It displays only to preseve backward compatibility.

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity64

Solid adoption and visibility

Community52

Growing community involvement

Maturity63

Established project with proven stability

 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 ~139 days

Recently: every ~87 days

Total

23

Last Release

1265d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dbcf615f9bf1c6b766e11376c5e76245da3b22bfc132da6a85c1e185f31ddd26?d=identicon)[mage2-team](/maintainers/mage2-team)

---

Top Contributors

[![Vinai](https://avatars.githubusercontent.com/u/72463?v=4)](https://github.com/Vinai "Vinai (140 commits)")[![Flyingmana](https://avatars.githubusercontent.com/u/237319?v=4)](https://github.com/Flyingmana "Flyingmana (134 commits)")[![tobi-pb](https://avatars.githubusercontent.com/u/940631?v=4)](https://github.com/tobi-pb "tobi-pb (65 commits)")[![datenbrille](https://avatars.githubusercontent.com/u/795463?v=4)](https://github.com/datenbrille "datenbrille (20 commits)")[![mage2-dev](https://avatars.githubusercontent.com/u/8040585?v=4)](https://github.com/mage2-dev "mage2-dev (15 commits)")[![mazhalai](https://avatars.githubusercontent.com/u/3421295?v=4)](https://github.com/mazhalai "mazhalai (15 commits)")[![kristof-ringleff](https://avatars.githubusercontent.com/u/47804013?v=4)](https://github.com/kristof-ringleff "kristof-ringleff (8 commits)")[![karyna-t](https://avatars.githubusercontent.com/u/55278634?v=4)](https://github.com/karyna-t "karyna-t (7 commits)")[![xmav](https://avatars.githubusercontent.com/u/2598101?v=4)](https://github.com/xmav "xmav (5 commits)")[![bibumathew](https://avatars.githubusercontent.com/u/660968?v=4)](https://github.com/bibumathew "bibumathew (5 commits)")[![bastianccm](https://avatars.githubusercontent.com/u/1145424?v=4)](https://github.com/bastianccm "bastianccm (4 commits)")[![fascinosum](https://avatars.githubusercontent.com/u/10269933?v=4)](https://github.com/fascinosum "fascinosum (4 commits)")[![yvoronoy](https://avatars.githubusercontent.com/u/8588929?v=4)](https://github.com/yvoronoy "yvoronoy (2 commits)")[![ark99](https://avatars.githubusercontent.com/u/13225984?v=4)](https://github.com/ark99 "ark99 (2 commits)")[![ArnaudLigny](https://avatars.githubusercontent.com/u/80580?v=4)](https://github.com/ArnaudLigny "ArnaudLigny (2 commits)")[![AydinHassan](https://avatars.githubusercontent.com/u/2817002?v=4)](https://github.com/AydinHassan "AydinHassan (2 commits)")[![danielrenaud](https://avatars.githubusercontent.com/u/30052560?v=4)](https://github.com/danielrenaud "danielrenaud (2 commits)")[![Maks3w](https://avatars.githubusercontent.com/u/1301698?v=4)](https://github.com/Maks3w "Maks3w (2 commits)")[![mzeis](https://avatars.githubusercontent.com/u/371060?v=4)](https://github.com/mzeis "mzeis (2 commits)")[![rjocoleman](https://avatars.githubusercontent.com/u/154176?v=4)](https://github.com/rjocoleman "rjocoleman (2 commits)")

---

Tags

magentocomposer-installer

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/magento-magento-composer-installer/health.svg)

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

###  Alternatives

[magento-hackathon/magento-composer-installer

Composer installer for Magento modules

214757.6k374](/packages/magento-hackathon-magento-composer-installer)[yireo/magento2-webp2

Magento 2 module to add WebP support to the Magento frontend

2091.2M7](/packages/yireo-magento2-webp2)[yireo/magento2-googletagmanager2

Add Google Tag Manager to Magento

167930.4k5](/packages/yireo-magento2-googletagmanager2)[yireo/magento2-extensionchecker

Scan the code of a Magento module

96151.6k3](/packages/yireo-magento2-extensionchecker)

PHPackages © 2026

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