Composer: Difference between revisions

From Han Wiki
Jump to navigation Jump to search
add a notes section
→‎Installation: add references
Line 1: Line 1:
Composer is a dependency manager for PHP.
Composer is a dependency manager for PHP.


== Installation ==
== Installation<ref>''Composer''. Program documentation. ''Composer''. N.p., n.d. Web. 26 Feb. 2015. <https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx>.</ref> ==
* ''Last tested on Ubuntu 14.04.2 LTS (trusty) | easy | less than a minute''


Installing Composer.
Installing Composer.


<syntaxhighlight lang="bash">
<div class="cli">
$ curl -sS https://getcomposer.org/installer | php
<span style="color:#00ff00;">mhan</span><span style="color:#444444;">@</span><span style="color:#00cccc;">brahms</span><span style="color:#999999">:</span><span style="color:blue;">~/bin</span><span style="color:#cccccc;">
#!/usr/bin/env php
$ <b class="color:white;">curl -sS <nowiki>https://getcomposer.org/installer</nowiki> | php</b>
All settings correct for using Composer
</span><br>
Downloading...
<span style="color:#cccccc">#!/usr/bin/env php</span><br>
 
<span style="color:#009933">All settings correct for using Composer</span><br>
Composer successfully installed to: /home/mhan/bin/tmp/composer.phar
<span style="color:#999900">Downloading...</span><br>
Use it: php composer.phar
<br>
</syntaxhighlight>
<span style="color:#009933">Composer successfully installed to: /home/mhan/bin/composer.phar</span><br>
<span style="color:#999900">Use it: php composer.phar</span>
</div>


Make sure you have PHP (CLI version) installed. If you're the only developer on the machine, you may want to create a folder called <span class="shell">~/bin</span> and put the generated composer file there. I usually rename mine to simply composer and then make it only user executable. By default it becomes other-executable. This way I can just invoke <code>$ composer update</code> from anywhere. Feel free to make it available to others by moving it to <span class="shell">/usr/local/bin</span>.
Make sure you have PHP (CLI version) installed. If you're the only developer on the machine, you may want to create a folder called <span class="shell">~/bin</span> and put the generated composer file there. I usually rename mine to simply composer and then make it only user executable. By default it becomes other-executable. This way I can just invoke <code>$ composer update</code> from anywhere. Feel free to make it available to others by moving it to <span class="shell">/usr/local/bin</span>.


* ''Last tested on Ubuntu 14.04.2 LTS (trusty) | easy | less than a minute''
== References ==
 
<div class="references-small"><references /></div>
* Reference
** ''Composer''. Program documentation. ''Composer''. N.p., n.d. Web. 26 Feb. 2015. <https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx>.


== Notes ==
== Notes ==

Revision as of 06:41, 1 March 2015

Composer is a dependency manager for PHP.

Installation[1]

  • Last tested on Ubuntu 14.04.2 LTS (trusty) | easy | less than a minute

Installing Composer.

mhan@brahms:~/bin $ curl -sS https://getcomposer.org/installer | php
#!/usr/bin/env php
All settings correct for using Composer
Downloading...

Composer successfully installed to: /home/mhan/bin/composer.phar
Use it: php composer.phar

Make sure you have PHP (CLI version) installed. If you're the only developer on the machine, you may want to create a folder called ~/bin and put the generated composer file there. I usually rename mine to simply composer and then make it only user executable. By default it becomes other-executable. This way I can just invoke $ composer update from anywhere. Feel free to make it available to others by moving it to /usr/local/bin.

References

  1. Composer. Program documentation. Composer. N.p., n.d. Web. 26 Feb. 2015. <https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx>.

Notes

Be sure to run $ composer self-update often as there are numerous updates even during a day to this software, as of year 2015.