Yaffs site version 1.1
[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-module`
57 | ExpressionEngine 3         | `ee3-addon`<br>`ee3-theme`
58 | FuelPHP v1.x | `fuel-module`<br>`fuel-package`<br/>`fuel-theme`
59 | FuelPHP v2.x | `fuelphp-component`
60 | Grav         | `grav-plugin`<br>`grav-theme`
61 | Hurad        | `hurad-plugin`<br>`hurad-theme`
62 | ImageCMS     | `imagecms-template`<br>`imagecms-module`<br>`imagecms-library`
63 | iTop         | `itop-extension`
64 | Joomla       | `joomla-component`<br>`joomla-module`<br>`joomla-template`<br>`joomla-plugin`<br>`joomla-library`
65 | Kanboard     | `kanboard-plugin`
66 | Kirby        | **`kirby-plugin`**<br>`kirby-field`<br>`kirby-tag`
67 | KodiCMS      | `kodicms-plugin`<br>`kodicms-media`
68 | Kohana       | **`kohana-module`**
69 | Laravel      | `laravel-library`
70 | Lavalite     | `lavalite-theme`<br>`lavalite-package`
71 | Lithium      | **`lithium-library`<br>`lithium-source`**
72 | Magento      | `magento-library`<br>`magento-skin`<br>`magento-theme`
73 | Mako         | `mako-package`
74 | Mautic       | `mautic-plugin`<br>`mautic-theme`
75 | Maya         | `maya-module`
76 | MODX Evo     | `modxevo-snippet`<br>`modxevo-plugin`<br>`modxevo-module`<br>`modxevo-template`<br>`modxevo-lib`
77 | MediaWiki    | `mediawiki-extension`
78 | October      | **`october-module`<br>`october-plugin`<br>`october-theme`**
79 | OntoWiki     | `ontowiki-extension`<br>`ontowiki-theme`<br>`ontowiki-translation`
80 | OXID         | `oxid-module`<br>`oxid-theme`<br>`oxid-out`
81 | MODULEWork   | `modulework-module`
82 | Moodle       | `moodle-*` (Please [check source](https://raw.githubusercontent.com/composer/installers/master/src/Composer/Installers/MoodleInstaller.php) for all supported types)
83 | Piwik        | `piwik-plugin`
84 | phpBB        | `phpbb-extension`<br>`phpbb-style`<br>`phpbb-language`
85 | Pimcore      | `pimcore-plugin`
86 | Plentymarkets      | `plentymarkets-plugin`
87 | PPI          | **`ppi-module`**
88 | Puppet       | `puppet-module`
89 | Porto        | `porto-container`
90 | RadPHP       | `radphp-bundle`
91 | REDAXO       | `redaxo-addon`
92 | ReIndex      | **`reindex-plugin`** <br> **`reindex-theme`**
93 | Roundcube    | `roundcube-plugin`
94 | shopware     | `shopware-backend-plugin`<br/>`shopware-core-plugin`<br/>`shopware-frontend-plugin`<br/>`shopware-theme`<br/>`shopware-plugin`<br/>`shopware-frontend-theme`
95 | SilverStripe | `silverstripe-module`<br>`silverstripe-theme`
96 | SMF          | `smf-module`<br>`smf-theme`
97 | SyDES        | `sydes-module`<br>`sydes-theme`
98 | symfony1     | **`symfony1-plugin`**
99 | Tusk         | `tusk-task`<br>`tusk-command`<br>`tusk-asset`
100 | 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`
101 | TYPO3 CMS    | `typo3-cms-extension` (Deprecated in this package, use the [TYPO3 CMS Installers](https://packagist.org/packages/typo3/cms-composer-installers) instead)
102 | Vanilla      | `vanilla-plugin`<br>`vanilla-theme`
103 | Vgmcp        | `vgmcp-bundle`<br>`vgmcp-theme`
104 | Wolf CMS     | `wolfcms-plugin`
105 | WordPress    | <b>`wordpress-plugin`<br>`wordpress-theme`</b><br>`wordpress-muplugin`
106 | YAWIK        | `yawik-module`
107 | Zend         | `zend-library`<br>`zend-extra`<br>`zend-module`
108 | Zikula       | `zikula-module`<br>`zikula-theme`
109 | Prestashop   | `prestashop-module`<br>`prestashop-theme`
110 | Phifty       | `phifty-bundle`<br>`phifty-framework`<br>`phifty-library`
111
112 ## Example `composer.json` File
113
114 This is an example for a CakePHP plugin. The only important parts to set in your
115 composer.json file are `"type": "cakephp-plugin"` which describes what your
116 package is and `"require": { "composer/installers": "~1.0" }` which tells composer
117 to load the custom installers.
118
119 ```json
120 {
121     "name": "you/ftp",
122     "type": "cakephp-plugin",
123     "require": {
124         "composer/installers": "~1.0"
125     }
126 }
127 ```
128
129 This would install your package to the `Plugin/Ftp/` folder of a CakePHP app
130 when a user runs `php composer.phar install`.
131
132 So submit your packages to [packagist.org](http://packagist.org)!
133
134 ## Custom Install Paths
135
136 If you are consuming a package that uses the `composer/installers` you can
137 override the install path with the following extra in your `composer.json`:
138
139 ```json
140 {
141     "extra": {
142         "installer-paths": {
143             "your/custom/path/{$name}/": ["shama/ftp", "vendor/package"]
144         }
145     }
146 }
147 ```
148
149 A package type can have a custom installation path with a `type:` prefix.
150
151 ``` json
152 {
153     "extra": {
154         "installer-paths": {
155             "your/custom/path/{$name}/": ["type:wordpress-plugin"]
156         }
157     }
158 }
159 ```
160
161 You can also have the same vendor packages with a custom installation path by
162 using the `vendor:` prefix.
163
164 ``` json
165 {
166     "extra": {
167         "installer-paths": {
168             "your/custom/path/{$name}/": ["vendor:my_organization"]
169         }
170     }
171 }
172 ```
173
174 These would use your custom path for each of the listed packages. The available
175 variables to use in your paths are: `{$name}`, `{$vendor}`, `{$type}`.
176
177 ## Custom Install Names
178
179 If you're a package author and need your package to be named differently when
180 installed consider using the `installer-name` extra.
181
182 For example you have a package named `shama/cakephp-ftp` with the type
183 `cakephp-plugin`. Installing with `composer/installers` would install to the
184 path `Plugin/CakephpFtp`. Due to the strict naming conventions, you as a
185 package author actually need the package to be named and installed to
186 `Plugin/Ftp`. Using the following config within your **package** `composer.json`
187 will allow this:
188
189 ```json
190 {
191     "name": "shama/cakephp-ftp",
192     "type": "cakephp-plugin",
193     "extra": {
194         "installer-name": "Ftp"
195     }
196 }
197 ```
198
199 Please note the name entered into `installer-name` will be the final and will
200 not be inflected.
201
202 ## Should we allow dynamic package types or paths? No.
203
204 What are they? The ability for a package author to determine where a package
205 will be installed either through setting the path directly in their
206 `composer.json` or through a dynamic package type: `"type":
207 "framework-install-here"`.
208
209 It has been proposed many times. Even implemented once early on and then
210 removed. Installers won't do this because it would allow a single package
211 author to wipe out entire folders without the user's consent. That user would
212 then come here to yell at us.
213
214 Anyone still wanting this capability should consider requiring https://github.com/oomphinc/composer-installers-extender.