Message-ID: <424929772.3680.1485854791747.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_3679_1784470062.1485854791747" ------=_Part_3679_1784470062.1485854791747 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Composer for System Administrators

Composer for System Administrators

=20
=20
=20
=20

Composer is an opensource PHP packaging system to manage dependen= cies.

This makes it easy to adapt package installs and updates to your workflo= w, allowing you to test new/updated packages in a development environment, = put the changes in your version control system (git, Subversion, Mercurial,= etc.), pull in those changes on a staging environment and, when approved, = put it in production.

composer.phar or composer ?

The following examples use a composer install global comman= d, as alternative use php composer.phar <command>.
Re= ad the answer in the FAQ: What Composer command-line do you have to use ?

See=20 the Composer documentation for further information

Technical= prerequisites

Composer requires PHP 5.3.2+ to run.

Useful Composer commands for System Administrators

Note: as usual with CLI, you can type:

$> php composer.phar help [--xml] [--format=3D"..."] [--raw] [comma=
nd_name]

to get help for the command.

 

On this page you will find some useful commands and an extract of the Co= mposer Documentation. The interesting options part is an extract of availab= le options

show

The show command displays detailed information about a pack= age, or lists all available packages.

Usage:

=20
 php composer.phar show [-i|--installed] [-p|--platform] [-a=
|--available] [-s|--self] [-N|--name-only] [-P|--path] [package] [version]<=
/pre>=20

require

The require command adds required packages to your composer= .json and installs them. If you do not want to install the new dependencies= immediately, you can call it with --no-update

Usage:

=20
php composer.phar require [--dev] [--prefer-source] [--prefer-dist=
] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependenci=
es] [packages1] ... [packagesN]
=20

Interesting o= ptions

   
 --prefer-source Forces installation from package sources when po= ssible, including VCS information.
 --prefer-dist

Forces installati= on from package dist even for dev versions.

 --no-progress

Do not output download progress.

 --no-update

Disables the automatic update of the dependen= cies.

 --update-with-dependencies

Allows inherited dependencies t= o be updated with explicit dependencies.

 

search

The search command searches for packages by its name.

Example :

=20
$> php composer.phar search symfony composer
=20

 can return to you a list like this:

 

=20
=20 =20  Expand source= =20
=20
=20
symfony/assetic-bundle Integrates Assetic into Sym=
fony2
symfony/monolog-bundle Symfony MonologBundle
ezsystems/ngsymfonytools-bundle Bundle of the legacy netgen/ngsymfonytools =
extension
symfony-cmf/routing Extends the Symfony2 routing component for dynamic rout=
es and chaining several routers
doctrine/doctrine-bundle Symfony DoctrineBundle
nelmio/cors-bundle Adds CORS (Cross-Origin Resource Sharing) headers suppor=
t in your Symfony2 application
tedivm/stash-bundle Incorporates the Stash caching library into Symfony.
egulias/listeners-debug-command-bundle Symfony 2 console command to debug l=
isteners
hautelook/templated-uri-router Symfony2 RFC-6570 compatible router and URL =
Generator
hautelook/templated-uri-bundle Symfony2 Bundle that provides a RFC-6570 com=
patible router and URL Generator.
symfony/swiftmailer-bundle Symfony SwiftmailerBundle
white-october/pagerfanta-bundle Bundle to use Pagerfanta with Symfony2
symfony/icu Contains an excerpt of the ICU data and classes to load it.
symfony/symfony The Symfony PHP framework
sensio/distribution-bundle The base bundle for the Symfony Distributions
symfony/symfony The Symfony PHP framework
symfony/console Symfony Console Component
symfony/filesystem Symfony Filesystem Component
symfony/finder Symfony Finder Component
symfony/process Symfony Process Component
symfony/yaml Symfony Yaml Component
symfony/translation Symfony Translation Component
symfony/debug Symfony Debug Component
symfony/routing Symfony Routing Component
symfony/icu Contains an excerpt of the ICU data to be used with symfony/int=
l.
symfony/config Symfony Config Component
symfony/validator Symfony Validator Component
symfony/stopwatch Symfony Stopwatch Component
symfony-cmf/symfony-cmf Symfony Content Management Framework
=20
=20

validate

The validate command validates a given composer.json.

 Usage

=20
 $> php composer.phar validate [--no-check-all] [file]=20

Interesting= options

option description

 --no-check-all 

Do not make a complete validation

 --profile 

Display timing and memory usage information
 --working-dir (-d) If specified, use the given direct= ory as working directory.

Automate in= stallation

Note that you can add some scripts to the Composer dependencies installa= tion.

The available events are :

  • pre-install-cmd
  • post-install-cmd
  • pre-update-cmd
  • post-update-cmd
  • pre-status-cmd
  • post-status-cmd
  • pre-package-install
  • post-package-install
  • pre-package-update
  • post-package-update
  • pre-package-uninstall
  • post-package-uninstall
  • pre-autoload-dump
  • post-autoload-dump
  • post-root-package-install
  • post-create-project-cmd
  • pre-archive-cmd
  • post-archive-cmd

See=20 the Composer documentation about scripts for = more information
=20
=20
=20
=20

 

=20
=20
=20
------=_Part_3679_1784470062.1485854791747--