Merge remote-tracking branch 'gerryvdm/feature'
Conflicts: src/Composer/Command/CreateProjectCommand.phppull/2294/head
commit
6e4e10620a
|
@ -68,6 +68,7 @@ class CreateProjectCommand extends Command
|
||||||
new InputOption('no-scripts', null, InputOption::VALUE_NONE, 'Whether to prevent execution of all defined scripts in the root package.'),
|
new InputOption('no-scripts', null, InputOption::VALUE_NONE, 'Whether to prevent execution of all defined scripts in the root package.'),
|
||||||
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.'),
|
||||||
))
|
))
|
||||||
->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
|
||||||
|
@ -137,11 +138,12 @@ EOT
|
||||||
$input->getOption('no-plugins'),
|
$input->getOption('no-plugins'),
|
||||||
$input->getOption('no-scripts'),
|
$input->getOption('no-scripts'),
|
||||||
$input->getOption('keep-vcs'),
|
$input->getOption('keep-vcs'),
|
||||||
$input->getOption('no-progress')
|
$input->getOption('no-progress'),
|
||||||
|
$input->getOption('no-install')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function installProject(IOInterface $io, $config, $packageName, $directory = null, $packageVersion = null, $stability = 'stable', $preferSource = false, $preferDist = false, $installDevPackages = false, $repositoryUrl = null, $disablePlugins = false, $noScripts = false, $keepVcs = false, $noProgress = false)
|
public function installProject(IOInterface $io, $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)
|
||||||
{
|
{
|
||||||
$oldCwd = getcwd();
|
$oldCwd = getcwd();
|
||||||
|
|
||||||
|
@ -160,6 +162,7 @@ EOT
|
||||||
}
|
}
|
||||||
|
|
||||||
// install dependencies of the created project
|
// install dependencies of the created project
|
||||||
|
if ($noInstall === false) {
|
||||||
$installer = Installer::create($io, $composer);
|
$installer = Installer::create($io, $composer);
|
||||||
$installer->setPreferSource($preferSource)
|
$installer->setPreferSource($preferSource)
|
||||||
->setPreferDist($preferDist)
|
->setPreferDist($preferDist)
|
||||||
|
@ -173,6 +176,7 @@ EOT
|
||||||
if (!$installer->run()) {
|
if (!$installer->run()) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$hasVcs = $installedFromVcs;
|
$hasVcs = $installedFromVcs;
|
||||||
if (!$keepVcs && $installedFromVcs
|
if (!$keepVcs && $installedFromVcs
|
||||||
|
|
Loading…
Reference in New Issue