1 # A Multi-Framework [Composer](http://getcomposer.org) Library Installer
3 [![Build Status](http://img.shields.io/travis/composer/installers.svg)](http://travis-ci.org/composer/installers)
5 This is for PHP package authors to require in their `composer.json`. It will
6 install their package to the correct location based on the specified package
9 The goal of Installers is to be a simple package type to install path map.
10 Users can also customize the install path per package and package authors can
11 modify the package name upon installing.
13 Installers isn't intended on replacing all custom installers. If your
14 package requires special installation handling then by all means, create a
15 custom installer to handle it.
17 **Natively Supported Frameworks**:
19 The following frameworks natively work with Composer and will be
20 installed to the default `vendor` directory. `composer/installers`
21 is not needed to install packages with these frameworks:
28 ## Current Supported Package Types
30 > Stable types are marked as **bold**, this means that installation paths
31 > for those type will not be changed. Any adjustment for those types would
32 > require creation of brand new type that will cover required changes.
36 | Aimeos | `aimeos-extension`
37 | Asgard | `asgard-module`<br>`asgard-theme`
38 | Attogram | `attogram-module`
40 | Bonefish | `bonefish-package`
41 | AnnotateCms | `annotatecms-module`<br>`annotatecms-component`<br>`annotatecms-service`
42 | Bitrix | `bitrix-module` (deprecated) <br>`bitrix-component` (deprecated) <br>`bitrix-theme` (deprecated) <br><br> `bitrix-d7-module` <br> `bitrix-d7-component` <br> `bitrix-d7-template`
43 | CakePHP 2+ | **`cakephp-plugin`**
44 | Chef | `chef-cookbook`<br>`chef-role`
45 | CCFramework | `ccframework-ship`<br>`ccframework-theme`
46 | Cockpit | `cockpit-module`
47 | CodeIgniter | `codeigniter-library`<br>`codeigniter-third-party`<br>`codeigniter-module`
48 | concrete5 | `concrete5-core`<br>`concrete5-package`<br>`concrete5-theme`<br>`concrete5-block`<br>`concrete5-update`
49 | Craft | `craft-plugin`
50 | Croogo | `croogo-plugin`<br>`croogo-theme`
51 | Decibel | `decibel-app`
52 | DokuWiki | `dokuwiki-plugin`<br>`dokuwiki-template`
53 | Dolibarr | `dolibarr-module`
54 | Drupal | <b>`drupal-core`<br>`drupal-module`<br>`drupal-theme`</b><br>`drupal-library`<br>`drupal-profile`<br>`drupal-drush`
55 | Elgg | `elgg-plugin`
56 | Eliasis | `eliasis-component`<br>`eliasis-module`<br>`eliasis-plugin`<br>`eliasis-template`
57 | ExpressionEngine 3 | `ee3-addon`<br>`ee3-theme`
58 | eZ Platform | `ezplatform-assets`<br>`ezplatform-meta-assets`
59 | FuelPHP v1.x | `fuel-module`<br>`fuel-package`<br/>`fuel-theme`
60 | FuelPHP v2.x | `fuelphp-component`
61 | Grav | `grav-plugin`<br>`grav-theme`
62 | Hurad | `hurad-plugin`<br>`hurad-theme`
63 | ImageCMS | `imagecms-template`<br>`imagecms-module`<br>`imagecms-library`
64 | iTop | `itop-extension`
65 | Joomla | `joomla-component`<br>`joomla-module`<br>`joomla-template`<br>`joomla-plugin`<br>`joomla-library`
66 | Kanboard | `kanboard-plugin`
67 | Kirby | **`kirby-plugin`**<br>`kirby-field`<br>`kirby-tag`
68 | KodiCMS | `kodicms-plugin`<br>`kodicms-media`
69 | Kohana | **`kohana-module`**
70 | Lan Management System | `lms-plugin`<br>`lms-template`<br>`lms-document-template`<br>`lms-userpanel-module`
71 | Laravel | `laravel-library`
72 | Lavalite | `lavalite-theme`<br>`lavalite-package`
73 | Lithium | **`lithium-library`<br>`lithium-source`**
74 | Magento | `magento-library`<br>`magento-skin`<br>`magento-theme`
75 | majima | `majima-plugin`
76 | Mako | `mako-package`
77 | Mautic | `mautic-plugin`<br>`mautic-theme`
78 | Maya | `maya-module`
80 | MODX Evo | `modxevo-snippet`<br>`modxevo-plugin`<br>`modxevo-module`<br>`modxevo-template`<br>`modxevo-lib`
81 | MediaWiki | `mediawiki-extension`
82 | October | **`october-module`<br>`october-plugin`<br>`october-theme`**
83 | OntoWiki | `ontowiki-extension`<br>`ontowiki-theme`<br>`ontowiki-translation`
84 | OXID | `oxid-module`<br>`oxid-theme`<br>`oxid-out`
85 | Osclass | `osclass-plugin`<br>`osclass-theme`<br>`osclass-language`
86 | MODULEWork | `modulework-module`
87 | Moodle | `moodle-*` (Please [check source](https://raw.githubusercontent.com/composer/installers/master/src/Composer/Installers/MoodleInstaller.php) for all supported types)
88 | Piwik | `piwik-plugin`
89 | phpBB | `phpbb-extension`<br>`phpbb-style`<br>`phpbb-language`
90 | Pimcore | `pimcore-plugin`
91 | Plentymarkets | `plentymarkets-plugin`
92 | PPI | **`ppi-module`**
93 | Puppet | `puppet-module`
94 | Porto | `porto-container`
95 | RadPHP | `radphp-bundle`
96 | REDAXO | `redaxo-addon`
97 | ReIndex | **`reindex-plugin`** <br> **`reindex-theme`**
98 | Roundcube | `roundcube-plugin`
99 | shopware | `shopware-backend-plugin`<br/>`shopware-core-plugin`<br/>`shopware-frontend-plugin`<br/>`shopware-theme`<br/>`shopware-plugin`<br/>`shopware-frontend-theme`
100 | SilverStripe | `silverstripe-module`<br>`silverstripe-theme`
101 | SiteDirect | `sitedirect-module`<br>`sitedirect-plugin`
102 | SMF | `smf-module`<br>`smf-theme`
103 | SyDES | `sydes-module`<br>`sydes-theme`
104 | symfony1 | **`symfony1-plugin`**
105 | Tusk | `tusk-task`<br>`tusk-command`<br>`tusk-asset`
106 | TYPO3 Flow | `typo3-flow-package`<br>`typo3-flow-framework`<br>`typo3-flow-plugin`<br>`typo3-flow-site`<br>`typo3-flow-boilerplate`<br>`typo3-flow-build`
107 | TYPO3 CMS | `typo3-cms-extension` (Deprecated in this package, use the [TYPO3 CMS Installers](https://packagist.org/packages/typo3/cms-composer-installers) instead)
108 | UserFrosting | `userfrosting-sprinkle`
109 | Vanilla | `vanilla-plugin`<br>`vanilla-theme`
110 | Vgmcp | `vgmcp-bundle`<br>`vgmcp-theme`
111 | Wolf CMS | `wolfcms-plugin`
112 | WordPress | <b>`wordpress-plugin`<br>`wordpress-theme`</b><br>`wordpress-muplugin`<br>`wordpress-dropin`
113 | YAWIK | `yawik-module`
114 | Zend | `zend-library`<br>`zend-extra`<br>`zend-module`
115 | Zikula | `zikula-module`<br>`zikula-theme`
116 | Prestashop | `prestashop-module`<br>`prestashop-theme`
117 | Phifty | `phifty-bundle`<br>`phifty-framework`<br>`phifty-library`
119 ## Example `composer.json` File
121 This is an example for a CakePHP plugin. The only important parts to set in your
122 composer.json file are `"type": "cakephp-plugin"` which describes what your
123 package is and `"require": { "composer/installers": "~1.0" }` which tells composer
124 to load the custom installers.
129 "type": "cakephp-plugin",
131 "composer/installers": "~1.0"
136 This would install your package to the `Plugin/Ftp/` folder of a CakePHP app
137 when a user runs `php composer.phar install`.
139 So submit your packages to [packagist.org](http://packagist.org)!
141 ## Custom Install Paths
143 If you are consuming a package that uses the `composer/installers` you can
144 override the install path with the following extra in your `composer.json`:
150 "your/custom/path/{$name}/": ["shama/ftp", "vendor/package"]
156 A package type can have a custom installation path with a `type:` prefix.
162 "your/custom/path/{$name}/": ["type:wordpress-plugin"]
168 You can also have the same vendor packages with a custom installation path by
169 using the `vendor:` prefix.
175 "your/custom/path/{$name}/": ["vendor:my_organization"]
181 These would use your custom path for each of the listed packages. The available
182 variables to use in your paths are: `{$name}`, `{$vendor}`, `{$type}`.
184 ## Custom Install Names
186 If you're a package author and need your package to be named differently when
187 installed consider using the `installer-name` extra.
189 For example you have a package named `shama/cakephp-ftp` with the type
190 `cakephp-plugin`. Installing with `composer/installers` would install to the
191 path `Plugin/CakephpFtp`. Due to the strict naming conventions, you as a
192 package author actually need the package to be named and installed to
193 `Plugin/Ftp`. Using the following config within your **package** `composer.json`
198 "name": "shama/cakephp-ftp",
199 "type": "cakephp-plugin",
201 "installer-name": "Ftp"
206 Please note the name entered into `installer-name` will be the final and will
209 ## Should we allow dynamic package types or paths? No.
211 What are they? The ability for a package author to determine where a package
212 will be installed either through setting the path directly in their
213 `composer.json` or through a dynamic package type: `"type":
214 "framework-install-here"`.
216 It has been proposed many times. Even implemented once early on and then
217 removed. Installers won't do this because it would allow a single package
218 author to wipe out entire folders without the user's consent. That user would
219 then come here to yell at us.
221 Anyone still wanting this capability should consider requiring https://github.com/oomphinc/composer-installers-extender.