composer module. ignore_platform_reqs option added.

This commit is contained in:
Roman Vyakhirev 2015-06-03 01:57:15 +03:00 committed by Matt Clay
parent 7817b69a1f
commit 414afb61df

View file

@ -82,6 +82,14 @@ options:
default: "yes" default: "yes"
choices: [ "yes", "no" ] choices: [ "yes", "no" ]
aliases: [ "optimize-autoloader" ] aliases: [ "optimize-autoloader" ]
ignore_platform_reqs:
version_added: "2.0"
description:
- Ignore php, hhvm, lib-* and ext-* requirements and force the installation even if the local machine does not fulfill these.
required: false
default: "no"
choices: [ "yes", "no" ]
aliases: [ "ignore-platform-reqs" ]
requirements: requirements:
- php - php
- composer installed in bin path (recommended /usr/local/bin) - composer installed in bin path (recommended /usr/local/bin)
@ -124,6 +132,7 @@ def main():
no_scripts = dict(default="no", type="bool", aliases=["no-scripts"]), no_scripts = dict(default="no", type="bool", aliases=["no-scripts"]),
no_plugins = dict(default="no", type="bool", aliases=["no-plugins"]), no_plugins = dict(default="no", type="bool", aliases=["no-plugins"]),
optimize_autoloader = dict(default="yes", type="bool", aliases=["optimize-autoloader"]), optimize_autoloader = dict(default="yes", type="bool", aliases=["optimize-autoloader"]),
ignore_platform_reqs = dict(default="no", type="bool", aliases=["ignore-platform-reqs"]),
), ),
supports_check_mode=True supports_check_mode=True
) )
@ -153,6 +162,8 @@ def main():
options.append('--no-plugins') options.append('--no-plugins')
if module.params['optimize_autoloader']: if module.params['optimize_autoloader']:
options.append('--optimize-autoloader') options.append('--optimize-autoloader')
if module.params['ignore_platform_reqs']:
options.append('--ignore-platform-reqs')
if module.check_mode: if module.check_mode:
options.append('--dry-run') options.append('--dry-run')