2017 © Pedro Peláez
 

composer-plugin magento-composer-installer

Composer installer for Magento modules

image

magento/magento-composer-installer

Composer installer for Magento modules

  • Wednesday, July 4, 2018
  • by mage2-dev
  • Repository
  • 55 Watchers
  • 42 Stars
  • 2,149,534 Installations
  • PHP
  • 210 Dependents
  • 0 Suggesters
  • 143 Forks
  • 9 Open issues
  • 15 Versions
  • 11 % Grown

The README.md

Magento Composer Installer

This is a fork of the Magento Composer Installer repo that provides support for Magento 2 components (modules, themes, language packages, libraries and components)., (*1)

Usage

In the component's composer.json, specify:, (*2)

  • 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., (*3)

    Note:, (*4)

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

Supported Components

The following list explains the use of type in composer.json., (*5)

Magento Module

"type": "magento2-module", (*6)

Installation location: Default vendor directory or as defined in extra/map, (*7)

Example:, (*8)

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

Final location is <magento root>/app/code/Magento/Core, (*9)

Magento Theme

"type": "magento2-theme", (*10)

Installation location: app/design, (*11)

Example:, (*12)

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

Final location is <magento_root>/app/design/frontend/Magento/luma, (*13)

Magento Language Package

"type": "magento2-language", (*14)

Installation location: app/i18n, (*15)

Example:, (*16)

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

Final location is <magento_root>/app/i18n/Magento/de_DE, (*17)

Magento Library

"type": "magento2-library", (*18)

Support for libraries located in lib/internal instead of in the vendor directory., (*19)

Example:, (*20)

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

Final location is <magento_root>/lib/internal/Magento/Framework, (*21)

Magento Component

"type": "magento2-component", (*22)

Installation location: Magento root directory, (*23)

Example:, (*24)

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

Final location is <magento_root>/dev/tools/Magento/Tools/Migration, (*25)

Autoload

After handling all Magento components, <magento_root>/app/etc/vendor_path.php specifies the path to your vendor directory., (*26)

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., (*27)

You must run composer install to install dependencies for a new application or composer update to update dependencies for an existing application., (*28)

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., (*29)

There are other deployment strategies that could be used; however, we don't guarantee that any of them will work., (*30)

Usage extra/chmod

The following example shows how you can set specific permissions for files., (*31)

Example:, (*32)

{
    "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, (*33)

path is a path to file relative to the Magento root folder, (*34)

Notes

  • The extra->magento-root-dir option is no longer supported. It displays only to preseve backward compatibility.

The Versions

04/07 2018

dev-master

9999999-dev https://github.com/magento/magento-composer-installer

Composer installer for Magento modules

  Sources   Download

OSL-3.0

The Requires

  • composer-plugin-api ^1.0

 

The Development Requires

by Vinai Kopp
by Daniel Fahlke aka Flyingmana
by Jörg Weller
by Karl Spies

composer-installer magento

29/12 2017

0.1.13

0.1.13.0 https://github.com/magento/magento-composer-installer

Composer installer for Magento modules

  Sources   Download

OSL-3.0

The Requires

  • composer-plugin-api ^1.0

 

The Development Requires

by Vinai Kopp
by Daniel Fahlke aka Flyingmana
by Jörg Weller
by Karl Spies

composer-installer magento

06/10 2016

0.1.12

0.1.12.0 https://github.com/magento/magento-composer-installer

Composer installer for Magento modules

  Sources   Download

OSL-3.0

The Requires

  • composer-plugin-api ^1.0

 

The Development Requires

by Vinai Kopp
by Daniel Fahlke aka Flyingmana
by Jörg Weller
by Karl Spies

composer-installer magento

15/06 2016

0.1.11

0.1.11.0 https://github.com/magento/magento-composer-installer

Composer installer for Magento modules

  Sources   Download

OSL-3.0

The Requires

  • composer-plugin-api ^1.0

 

The Development Requires

by Vinai Kopp
by Daniel Fahlke aka Flyingmana
by Jörg Weller
by Karl Spies

composer-installer magento

10/06 2016

0.1.10

0.1.10.0 https://github.com/magento/magento-composer-installer

Composer installer for Magento modules

  Sources   Download

OSL-3.0

The Requires

  • composer-plugin-api ^1.0

 

The Development Requires

by Vinai Kopp
by Daniel Fahlke aka Flyingmana
by Jörg Weller
by Karl Spies

composer-installer magento

24/05 2016

0.1.9

0.1.9.0 https://github.com/magento/magento-composer-installer

Composer installer for Magento modules

  Sources   Download

OSL-3.0

The Requires

  • composer-plugin-api ^1.0

 

The Development Requires

by Vinai Kopp
by Daniel Fahlke aka Flyingmana
by Jörg Weller
by Karl Spies

composer-installer magento

17/05 2016

0.1.8

0.1.8.0 https://github.com/magento/magento-composer-installer

Composer installer for Magento modules

  Sources   Download

OSL-3.0

The Requires

  • composer-plugin-api ^1.0

 

The Development Requires

by Vinai Kopp
by Daniel Fahlke aka Flyingmana
by Jörg Weller
by Karl Spies

composer-installer magento

06/04 2016

0.1.7

0.1.7.0 https://github.com/magento/magento-composer-installer

Composer installer for Magento modules

  Sources   Download

OSL-3.0

The Requires

  • composer-plugin-api ^1.0

 

The Development Requires

by Vinai Kopp
by Daniel Fahlke aka Flyingmana
by Jörg Weller
by Karl Spies

composer-installer magento

25/01 2016

0.1.6

0.1.6.0 https://github.com/magento/magento-composer-installer

Composer installer for Magento modules

  Sources   Download

OSL-3.0

The Requires

  • composer-plugin-api ^1.0

 

The Development Requires

by Vinai Kopp
by Daniel Fahlke aka Flyingmana
by Jörg Weller
by Karl Spies

composer-installer magento

14/09 2015

0.1.5

0.1.5.0 https://github.com/magento/magento-composer-installer

Composer installer for Magento modules

  Sources   Download

OSL-3.0

The Requires

  • composer-plugin-api ^1.0

 

The Development Requires

by Vinai Kopp
by Daniel Fahlke aka Flyingmana
by Jörg Weller
by Karl Spies

composer-installer magento

05/03 2015

0.1.4

0.1.4.0 https://github.com/magento/magento-composer-installer

Composer installer for Magento modules

  Sources   Download

OSL-3.0

The Requires

  • composer-plugin-api 1.0.0

 

The Development Requires

by Vinai Kopp
by Daniel Fahlke aka Flyingmana
by Jörg Weller
by Karl Spies

composer-installer magento

11/11 2014

0.1.3

0.1.3.0 https://github.com/magento/magento-composer-installer

Composer installer for Magento modules

  Sources   Download

OSL-3.0

The Requires

 

The Development Requires

by Vinai Kopp
by Daniel Fahlke aka Flyingmana
by Jörg Weller
by Karl Spies

composer-installer magento

31/10 2014

0.1.2

0.1.2.0 https://github.com/magento/magento-composer-installer

Composer installer for Magento modules

  Sources   Download

OSL-3.0

The Requires

 

The Development Requires

by Vinai Kopp
by Daniel Fahlke aka Flyingmana
by Jörg Weller
by Karl Spies

composer-installer magento

01/08 2014

0.1.1

0.1.1.0 https://github.com/magento/magento-composer-installer

Composer installer for Magento modules

  Sources   Download

OSL-3.0

The Requires

 

The Development Requires

by Vinai Kopp
by Daniel Fahlke aka Flyingmana
by Jörg Weller
by Karl Spies

composer-installer magento

17/07 2014

0.1.0

0.1.0.0 https://github.com/magento-hackathon/magento-composer-installer

Composer installer for Magento modules

  Sources   Download

OSL-3.0

The Requires

 

The Development Requires

by Vinai Kopp
by Daniel Fahlke aka Flyingmana
by Jörg Weller
by Karl Spies

composer-installer magento