瀏覽代碼

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

Benjamin Eberlei 13 年之前
父節點
當前提交
db64917a83
共有 3 個文件被更改,包括 12 次插入11 次删除
  1. 3 3
      doc/create-projects.md
  2. 8 7
      src/Composer/Command/CreateProjectCommand.php
  3. 1 1
      src/Composer/Console/Application.php

+ 3 - 3
doc/create-projects.md

@@ -1,14 +1,14 @@
 # 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.
 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.
 
-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.
 

+ 8 - 7
src/Composer/Command/InstallProjectCommand.php → src/Composer/Command/CreateProjectCommand.php

@@ -27,13 +27,13 @@ use Composer\Installer\ProjectInstaller;
  *
  * @author Benjamin Eberlei <kontakt@beberlei.de>
  */
-class InstallProjectCommand extends Command
+class CreateProjectCommand extends Command
 {
     protected function configure()
     {
         $this
-            ->setName('install-project')
-            ->setDescription('Install a package as new project into given directory.')
+            ->setName('create-project')
+            ->setDescription('Create new project from a package into given directory.')
             ->setDefinition(array(
                 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.'),
@@ -42,11 +42,12 @@ class InstallProjectCommand extends Command
                 new InputArgument('directory', InputArgument::OPTIONAL),
             ))
             ->setHelp(<<<EOT
-The <info>install-project</info> command installs a given package into a new directory.
-You can use this command to bootstrap new projects or setup a clean installation for
-new developers of your project.
+The <info>create-project</info> command creates a new project from a given
+package into a new directory. You can use this command to bootstrap new
+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
 controlled code by appending the <info>'--prefer-source'</info> flag.

+ 1 - 1
src/Composer/Console/Application.php

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