composer/installers
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|
Composer/Installers acts as a multi-framework library installer for PHP package authors who utilize it in their composer.json
. Its primary function is to install the specified packages in the correct location based on the package type. Composer/Installers is a simple package type to install path map that allows users to customize the install path for each package, and package authors can modify the package name upon installation. However, it is not intended to replace all custom installers. If the package requires special installation handling, a custom installer should be created to handle it.
To use Composer/Installers, you need to define it in your composer.json file. Here’s an example for a CakePHP plugin:
{
"name": "you/ftp",
"type": "cakephp-plugin",
"require": {
"composer/installers": "~1.0"
}
}
This will install your package to the Plugin/Ftp/
folder of a CakePHP app when php composer.phar install
is run.
You can configure custom install paths as follows:
{
"extra": {
"installer-paths": {
"your/custom/path/{$name}/": ["shama/ftp", "vendor/package"]
}
}
}
If you want to set a non-standard installation path for all packages of a particular type or a particular vendor, use the type:
or vendor:
prefix respectively.
The official documentation for Composer/Installers can be found in its GitHub repository. The readme file in the repository provides detailed information on how to use the package, from installing it to customizing install paths and naming conventions.