Composer global installer
This plugin allows to choose which packages should be installed in a shared directory with their version number as in this example:, (*1)
Case 1: inside the package, (*2)
vendor
โโโ autoload.php
โโโ composer
โโโ itscaro
โโโ composer-global-installer
vendor-global/
โโโ zendframework
โโโ zendframework1-1.12.3
โโโ zendframework1-1.12.6
Case 2: outside the package (globally shared for instance), (*3)
/package/
vendor
โโโ autoload.php
โโโ composer
โโโ itscaro
โโโ composer-global-installer
/usr/share/php/
vendor-global/
โโโ zendframework
โโโ zendframework1-1.12.3
โโโ zendframework1-1.12.6
Configuration, (*4)
itscaro-global-installer is required to be present to activate this plugin, all nested properties are optional. By default, this plugin is active for "library" packages., (*5)
Default values, (*6)
{
"config": {
"vendor-dir": "vendor",
"itscaro-global-installer": {
"vendor-global-dir": "vendor-global",
"vendor-global-packages": [],
"vendor-global-types": [
"library"
]
}
},
}
Only zendframework/zendframework1 package is installed in /usr/share/php, (*7)
{
"config": {
"vendor-dir": "vendor",
"composer-global-installer": {
"vendor-global-dir": "/usr/share/php",
"vendor-global-packages": [
"zendframework/zendframework1"
]
}
},
}
Usage:, (*8)
The plugin should be the first required packaged., (*9)
{
"require": {
"itscaro/composer-global-installer": "1.0.0",
"zendframework/zendframework1": "1.12.6"
}
}
=======================, (*10)
Credits to Martin Hasoล martin.hason@gmail.com, (*11)