Global navigation

   Documentation Center
   eZ Studio & eZ Platform
     User Manual
     Technical Manual
   eZ Publish 4.x / legacy

eZ Publish (5.x)

eZ Publish 5.x | For eZ Platform & eZ Studio topics see Technical manual and User manual, for eZ Publish 4.x and Legacy topics see eZ Publish legacy

Skip to end of metadata
Go to start of metadata

composer.phar or composer ?

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

See the Composer documentation for further information

Technical pre-requisites

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="..."] [--raw] [command_name]

to get the help of the command.


You will find on this page some useful commands and an extract of the Composer Documentation. The interesting options part is an extract of available options


 The show command displays detailed information about a package, or lists all packages available.



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


Interesting options

 --prefer-sourceForces installation from package sources when possible, including VCS information.

Forces installation from package dist even for dev versions.


Do not output download progress.


Disables the automatic update of the dependencies.


Allows inherited dependencies to be updated with explicit dependencies.


 The search command searches for packages by its name.

Example :

 can returns to you a list like this :


 Expand source


 The validate command validates a given composer.json


Interesting options



Do not make a complete validation


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

Automate installation

Note that you can add some scripts to the Composer dependencies installation.

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 the Composer documentation about scripts for more information