diff --git a/doc/create-projects.md b/doc/create-projects.md index 4a373dbac..0cf187959 100644 --- a/doc/create-projects.md +++ b/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. diff --git a/src/Composer/Command/InstallProjectCommand.php b/src/Composer/Command/CreateProjectCommand.php similarity index 89% rename from src/Composer/Command/InstallProjectCommand.php rename to src/Composer/Command/CreateProjectCommand.php index c03cfeb0c..b1d1c9854 100644 --- a/src/Composer/Command/InstallProjectCommand.php +++ b/src/Composer/Command/CreateProjectCommand.php @@ -27,13 +27,13 @@ use Composer\Installer\ProjectInstaller; * * @author Benjamin Eberlei */ -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(<<install-project 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 create-project 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. -php composer.phar install-project vendor/project intodirectory +php composer.phar create-project vendor/project intodirectory To setup a developer workable version you should create the project using the source controlled code by appending the '--prefer-source' flag. diff --git a/src/Composer/Console/Application.php b/src/Composer/Console/Application.php index 5802e2f86..e836d65c8 100644 --- a/src/Composer/Console/Application.php +++ b/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());