Add --ignore-platform-reqs to create-project, refs #1426
parent
095dc61295
commit
8d0c1a14b3
|
@ -467,6 +467,9 @@ By default the command checks for the packages on packagist.org.
|
||||||
* **--keep-vcs:** Skip the deletion of the VCS metadata for the created
|
* **--keep-vcs:** Skip the deletion of the VCS metadata for the created
|
||||||
project. This is mostly useful if you run the command in non-interactive
|
project. This is mostly useful if you run the command in non-interactive
|
||||||
mode.
|
mode.
|
||||||
|
* **--ignore-platform-reqs:** ignore `php`, `hhvm`, `lib-*` and `ext-*`
|
||||||
|
requirements and force the installation even if the local machine does not
|
||||||
|
fulfill these.
|
||||||
|
|
||||||
## dump-autoload
|
## dump-autoload
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,7 @@ class CreateProjectCommand extends Command
|
||||||
new InputOption('no-progress', null, InputOption::VALUE_NONE, 'Do not output download progress.'),
|
new InputOption('no-progress', null, InputOption::VALUE_NONE, 'Do not output download progress.'),
|
||||||
new InputOption('keep-vcs', null, InputOption::VALUE_NONE, 'Whether to prevent deletion vcs folder.'),
|
new InputOption('keep-vcs', null, InputOption::VALUE_NONE, 'Whether to prevent deletion vcs folder.'),
|
||||||
new InputOption('no-install', null, InputOption::VALUE_NONE, 'Whether to skip installation of the package dependencies.'),
|
new InputOption('no-install', null, InputOption::VALUE_NONE, 'Whether to skip installation of the package dependencies.'),
|
||||||
|
new InputOption('ignore-platform-reqs', null, InputOption::VALUE_NONE, 'Ignore platform requirements (php & ext- packages).'),
|
||||||
))
|
))
|
||||||
->setHelp(<<<EOT
|
->setHelp(<<<EOT
|
||||||
The <info>create-project</info> command creates a new project from a given
|
The <info>create-project</info> command creates a new project from a given
|
||||||
|
@ -125,11 +126,12 @@ EOT
|
||||||
$input->getOption('keep-vcs'),
|
$input->getOption('keep-vcs'),
|
||||||
$input->getOption('no-progress'),
|
$input->getOption('no-progress'),
|
||||||
$input->getOption('no-install'),
|
$input->getOption('no-install'),
|
||||||
|
$input->getOption('ignore-platform-reqs'),
|
||||||
$input
|
$input
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function installProject(IOInterface $io, Config $config, $packageName, $directory = null, $packageVersion = null, $stability = 'stable', $preferSource = false, $preferDist = false, $installDevPackages = false, $repositoryUrl = null, $disablePlugins = false, $noScripts = false, $keepVcs = false, $noProgress = false, $noInstall = false, InputInterface $input)
|
public function installProject(IOInterface $io, Config $config, $packageName, $directory = null, $packageVersion = null, $stability = 'stable', $preferSource = false, $preferDist = false, $installDevPackages = false, $repositoryUrl = null, $disablePlugins = false, $noScripts = false, $keepVcs = false, $noProgress = false, $noInstall = false, $ignorePlatformReqs = false, InputInterface $input)
|
||||||
{
|
{
|
||||||
$oldCwd = getcwd();
|
$oldCwd = getcwd();
|
||||||
|
|
||||||
|
@ -159,7 +161,8 @@ EOT
|
||||||
$installer->setPreferSource($preferSource)
|
$installer->setPreferSource($preferSource)
|
||||||
->setPreferDist($preferDist)
|
->setPreferDist($preferDist)
|
||||||
->setDevMode($installDevPackages)
|
->setDevMode($installDevPackages)
|
||||||
->setRunScripts( ! $noScripts);
|
->setRunScripts(!$noScripts)
|
||||||
|
->setIgnorePlatformRequirements($ignorePlatformReqs);
|
||||||
|
|
||||||
if ($disablePlugins) {
|
if ($disablePlugins) {
|
||||||
$installer->disablePlugins();
|
$installer->disablePlugins();
|
||||||
|
|
Loading…
Reference in New Issue