7f488b9da54ba7c75e663211af8b84faf7045ec1
[yaffs-website] / vendor / composer / installers / README.md
1 # A Multi-Framework [Composer](http://getcomposer.org) Library Installer
2
3 [![Build Status](http://img.shields.io/travis/composer/installers.svg)](http://travis-ci.org/composer/installers)
4
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
7 type.
8
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.
12
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.
16
17 **Natively Supported Frameworks**:
18
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:
22
23 * Aura
24 * Symfony2
25 * Yii
26 * Yii2
27
28 ## Current Supported Package Types
29
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.
33
34 | Framework    | Types
35 | ---------    | -----
36 | Aimeos       | `aimeos-extension`
37 | Asgard       | `asgard-module`<br>`asgard-theme`
38 | Attogram     | `attogram-module`
39 | AGL          | `agl-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`
79 | MODX         | `modx-extra`
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`
118
119 ## Example `composer.json` File
120
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.
125
126 ```json
127 {
128     "name": "you/ftp",
129     "type": "cakephp-plugin",
130     "require": {
131         "composer/installers": "~1.0"
132     }
133 }
134 ```
135
136 This would install your package to the `Plugin/Ftp/` folder of a CakePHP app
137 when a user runs `php composer.phar install`.
138
139 So submit your packages to [packagist.org](http://packagist.org)!
140
141 ## Custom Install Paths
142
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`:
145
146 ```json
147 {
148     "extra": {
149         "installer-paths": {
150             "your/custom/path/{$name}/": ["shama/ftp", "vendor/package"]
151         }
152     }
153 }
154 ```
155
156 A package type can have a custom installation path with a `type:` prefix.
157
158 ``` json
159 {
160     "extra": {
161         "installer-paths": {
162             "your/custom/path/{$name}/": ["type:wordpress-plugin"]
163         }
164     }
165 }
166 ```
167
168 You can also have the same vendor packages with a custom installation path by
169 using the `vendor:` prefix.
170
171 ``` json
172 {
173     "extra": {
174         "installer-paths": {
175             "your/custom/path/{$name}/": ["vendor:my_organization"]
176         }
177     }
178 }
179 ```
180
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}`.
183
184 ## Custom Install Names
185
186 If you're a package author and need your package to be named differently when
187 installed consider using the `installer-name` extra.
188
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`
194 will allow this:
195
196 ```json
197 {
198     "name": "shama/cakephp-ftp",
199     "type": "cakephp-plugin",
200     "extra": {
201         "installer-name": "Ftp"
202     }
203 }
204 ```
205
206 Please note the name entered into `installer-name` will be the final and will
207 not be inflected.
208
209 ## Should we allow dynamic package types or paths? No.
210
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"`.
215
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.
220
221 Anyone still wanting this capability should consider requiring https://github.com/oomphinc/composer-installers-extender.