Merge f43dda0506
into 64b0f60368
This commit is contained in:
commit
3df08c937c
|
@ -28,6 +28,7 @@ class Composer implements PHPCI\Plugin, PHPCI\ZeroConfigPlugin
|
|||
protected $phpci;
|
||||
protected $build;
|
||||
protected $nodev;
|
||||
protected $ignorePlatformReqs;
|
||||
|
||||
/**
|
||||
* Check if this plugin can be executed.
|
||||
|
@ -63,6 +64,7 @@ class Composer implements PHPCI\Plugin, PHPCI\ZeroConfigPlugin
|
|||
$this->preferDist = false;
|
||||
$this->preferSource = false;
|
||||
$this->nodev = false;
|
||||
$this->ignorePlatformReqs = false;
|
||||
|
||||
if (array_key_exists('directory', $options)) {
|
||||
$this->directory = $path . DIRECTORY_SEPARATOR . $options['directory'];
|
||||
|
@ -84,6 +86,10 @@ class Composer implements PHPCI\Plugin, PHPCI\ZeroConfigPlugin
|
|||
if (array_key_exists('no_dev', $options)) {
|
||||
$this->nodev = (bool)$options['no_dev'];
|
||||
}
|
||||
|
||||
if (array_key_exists('ignore_platform_reqs', $options)) {
|
||||
$this->ignorePlatformReqs = (bool)$options['ignore_platform_reqs'];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -116,6 +122,11 @@ class Composer implements PHPCI\Plugin, PHPCI\ZeroConfigPlugin
|
|||
$cmd .= ' --no-dev';
|
||||
}
|
||||
|
||||
if ($this->ignorePlatformReqs) {
|
||||
$this->phpci->log('Using --ignore-platform-reqs flag');
|
||||
$cmd .= ' --ignore-platform-reqs';
|
||||
}
|
||||
|
||||
$cmd .= ' --working-dir="%s" %s';
|
||||
|
||||
return $this->phpci->executeCommand($cmd, $this->directory, $this->action);
|
||||
|
|
Loading…
Reference in a new issue