The short version: If everything's configured correctly, you don't need to do anything. The way packages.firegento.com works is by taking advantage of a Composer custom installer plugin. This custom installer plugin handles symlinking or copying the files (depending on the value of magento-deploystrategy
in the extra
configuration section)
However, somewhere in your composer require
configuration, you need to include the magento-hackathon/magento-composer-installer
package.
"require": {
"magento-hackathon/magento-composer-installer": "*"
},
This package installs the composer plugin, which in turn enables the custom installation functionality. This is why every composer plugin should have this package in its require
list.
You can install Magento 2 extension easily from any VCS (github or bitbcuket) if the module is packed with proper composer.json file.
For example, in order to install Easy Template Path Hints 2 extension, you just have to run two commands for installation:
composer config repositories.magesycho-magento2-easy-template-path-hints git git@github.com:MagePsycho/magento2-easy-template-path-hints.git
composer require magepsycho/magento2-easy-template-path-hints:dev-master
Explanation:
1> Registering the module git repository
composer config repositories.magesycho-magento2-easy-template-path-hints git git@github.com:MagePsycho/magento2-easy-template-path-hints.git
Composer config repository command syntax looks like:
composer config repositories.<unique-repo-name> <vcs-type> <vcs-url-https-or-sshl>
Composer will register a new repository to composer.json (under "repositories" node). Updated composer.json looks like:
{
"repositories": {
"magesycho-magento2-easy-template-path-hints": {
"type": "git",
"url": "git@github.com:MagePsycho/magento2-easy-template-path-hints.git"
}
}
}
2> Registering the module package itself
composer require magepsycho/magento2-easy-template-path-hints:dev-master
Composer require command syntax:
composer require <vendor>/<package>:dev-<branch>
This will add new dependent package under node “require” as:
{
"name": "magento/magento2ce",
"description": "Magento 2 (Community Edition)",
"type": "project",
"require": {
"magepsycho/magento2-easy-template-path-hints": "dev-master"
}
}
and download the module from the repo.
And if you have extension zip file, just extract it and copy it to the app/code/
folder - as that simple.
Once the Module is installed, you can simply enable it using following commands:
php bin/magento module:enable MagePsycho_Easypathhints --clear-static-content
php bin/magento setup:upgrade
Best Answer
You can use https://packagist.org/ to allow your module to install by composer. It is pretty easy you can read more using this link https://packagist.org/about
If it will help us then you can up vote and accept this as useful.