mc_php / PHP tools¶
This state can be used to make some fun things with PHP. Like installing composer
install-global-php-composer: mc_php.composer: - name: /usr/local/bin/composer - installer: https://getcomposer.org/installer - update: False
composer_(name, installer=None, update=False)¶
Download composer.phar from the given url and install it on the given name. A check is done on the given name, if it’s already available nothing is done, except if update is set to True
- Local file name of composer (like /usr/local/bin/composer)
- Distant name of composer phar installer source like https://getcomposer.org/installer which is the default
- Boolean, whether to redo the install even if the program is already there or not.
composercommand(name, cwd=None, args=None, composer=None)¶
Run a composer command.
- Command name (as reported by composer list –raw
- Working directory, so also the directory of the composer.json file.
- string of optionnal arguments for this command
- full path to composer, default is /usr/local/bin/composer