composer – Dependency Manager for PHP¶
Synopsis¶
Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you.
Requirements¶
The below requirements are needed on the host that executes this module.
php
composer installed in bin path (recommended /usr/local/bin)
Parameters¶
Notes¶
Note
Default options that are always appended in each execution are –no-ansi, –no-interaction and –no-progress if available.
We received reports about issues on macOS if composer was installed by Homebrew. Please use the official install method to avoid issues.
Examples¶
# Downloads and installs all the libs and dependencies outlined in the /path/to/project/composer.lock
- composer:
command: install
working_dir: /path/to/project
- composer:
command: require
arguments: my/package
working_dir: /path/to/project
# Clone project and install with all dependencies
- composer:
command: create-project
arguments: package/package /path/to/project ~1.0
working_dir: /path/to/project
prefer_dist: yes
# Installs package globally
- composer:
command: require
global_command: yes
arguments: my/package
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]
Authors¶
Dimitrios Tydeas Mengidis (@dmtrs)
René Moser (@resmo)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.