1
0
Fork 0

Renamed install-project to create-project to differentiate from just "install".

pull/322/head
Benjamin Eberlei 2012-02-19 12:42:00 +01:00
parent 62bdaaf408
commit db64917a83
3 changed files with 12 additions and 11 deletions

View File

@ -1,14 +1,14 @@
# Create Projects # Create Projects
You can use Composer to create new projects from existing packages. There are several applications for this: You can use Composer to create new projects from an existing package. There are several applications for this:
1. You can deploy application packages. 1. You can deploy application packages.
2. You can check out any package and start developing on patches for example. 2. You can check out any package and start developing on patches for example.
3. Projects with multiple developers can use this feature to bootstrap the initial application for development. 3. Projects with multiple developers can use this feature to bootstrap the initial application for development.
To create a new project using composer you can use the "install-project", pass it a package name + version and a directory to create the project in. The directory is not allowed to exist, it will be created during installation. To create a new project using composer you can use the "create-project", pass it a package name + version and a directory to create the project in. The directory is not allowed to exist, it will be created during installation.
php composer.phar install-project doctrine/orm 2.2.0 /path/to/new-project php composer.phar create-project doctrine/orm 2.2.0 /path/to/new-project
By default the command checks for the packages on packagist.org. To change this behavior you can use the --repository-url parameter and either point it to an HTTP url for your own packagist repository or to a packages.json file. By default the command checks for the packages on packagist.org. To change this behavior you can use the --repository-url parameter and either point it to an HTTP url for your own packagist repository or to a packages.json file.

View File

@ -27,13 +27,13 @@ use Composer\Installer\ProjectInstaller;
* *
* @author Benjamin Eberlei <kontakt@beberlei.de> * @author Benjamin Eberlei <kontakt@beberlei.de>
*/ */
class InstallProjectCommand extends Command class CreateProjectCommand extends Command
{ {
protected function configure() protected function configure()
{ {
$this $this
->setName('install-project') ->setName('create-project')
->setDescription('Install a package as new project into given directory.') ->setDescription('Create new project from a package into given directory.')
->setDefinition(array( ->setDefinition(array(
new InputOption('prefer-source', null, InputOption::VALUE_NONE, 'Forces installation from package sources when possible, including VCS information.'), new InputOption('prefer-source', null, InputOption::VALUE_NONE, 'Forces installation from package sources when possible, including VCS information.'),
new InputOption('repository-url', null, InputOption::VALUE_REQUIRED, 'Pick a different repository url to look for the package.'), new InputOption('repository-url', null, InputOption::VALUE_REQUIRED, 'Pick a different repository url to look for the package.'),
@ -42,11 +42,12 @@ class InstallProjectCommand extends Command
new InputArgument('directory', InputArgument::OPTIONAL), new InputArgument('directory', InputArgument::OPTIONAL),
)) ))
->setHelp(<<<EOT ->setHelp(<<<EOT
The <info>install-project</info> command installs a given package into a new directory. The <info>create-project</info> command creates a new project from a given
You can use this command to bootstrap new projects or setup a clean installation for package into a new directory. You can use this command to bootstrap new
new developers of your project. projects or setup a clean version-controlled installation
for developers of your project.
<info>php composer.phar install-project vendor/project intodirectory</info> <info>php composer.phar create-project vendor/project intodirectory</info>
To setup a developer workable version you should create the project using the source To setup a developer workable version you should create the project using the source
controlled code by appending the <info>'--prefer-source'</info> flag. controlled code by appending the <info>'--prefer-source'</info> flag.

View File

@ -107,7 +107,7 @@ class Application extends BaseApplication
$this->add(new Command\DependsCommand()); $this->add(new Command\DependsCommand());
$this->add(new Command\InitCommand()); $this->add(new Command\InitCommand());
$this->add(new Command\InstallCommand()); $this->add(new Command\InstallCommand());
$this->add(new Command\InstallProjectCommand()); $this->add(new Command\CreateProjectCommand());
$this->add(new Command\UpdateCommand()); $this->add(new Command\UpdateCommand());
$this->add(new Command\SearchCommand()); $this->add(new Command\SearchCommand());
$this->add(new Command\ValidateCommand()); $this->add(new Command\ValidateCommand());