> **Note:** If the above fails due to permissions, run the `mv` line
> again with sudo.
> **Note:** In OSX Yosemite the `/usr` directory does not exist by default. If you receive the error "/usr/local/bin/composer: No such file or directory" then you must create `/usr/local/bin/` manually before proceeding.
Then, just run `composer` in order to run Composer instead of `php composer.phar`.
"description":"Package name, including 'vendor-name/' prefix.",
"required":true
"description":"Package name, including 'vendor-name/' prefix."
},
"type":{
"description":"Package type, either 'library' for common packages, 'composer-plugin' for plugins, 'metapackage' for empty packages, or a custom type ([a-z0-9-]+) defined by whatever project this package applies to.",
@ -18,8 +19,7 @@
},
"description":{
"type":"string",
"description":"Short package description.",
"required":true
"description":"Short package description."
},
"keywords":{
"type":"array",
@ -51,11 +51,11 @@
"items":{
"type":"object",
"additionalProperties":false,
"required":["name"],
"properties":{
"name":{
"type":"string",
"description":"Full name of the author.",
"required":true
"description":"Full name of the author."
},
"email":{
"type":"string",
@ -197,6 +197,10 @@
"type":"boolean",
"description":"If false, the composer autoloader will not be prepended to existing autoloaders, defaults to true."
},
"classmap-authoritative":{
"type":"boolean",
"description":"If true, the composer autoloader will not scan the filesystem for classes that are not found in the class map, defaults to false."
},
"github-domains":{
"type":"array",
"description":"A list of domains to use in github mode. This is used for GitHub Enterprise setups, defaults to [\"github.com\"].",
@ -38,7 +38,7 @@ class RequireCommand extends InitCommand
->setName('require')
->setDescription('Adds required packages to your composer.json and installs them')
->setDefinition(array(
new InputArgument('packages', InputArgument::IS_ARRAY | InputArgument::OPTIONAL, 'Required package with a version constraint, e.g. foo/bar:1.0.0 or foo/bar=1.0.0 or "foo/bar 1.0.0"'),
new InputArgument('packages', InputArgument::IS_ARRAY | InputArgument::OPTIONAL, 'Required package name optionally including a version constraint, e.g. foo/bar or foo/bar:1.0.0 or foo/bar=1.0.0 or "foo/bar 1.0.0"'),
new InputOption('dev', null, InputOption::VALUE_NONE, 'Add requirement to require-dev.'),
new InputOption('prefer-source', null, InputOption::VALUE_NONE, 'Forces installation from package sources when possible, including VCS information.'),
new InputOption('prefer-dist', null, InputOption::VALUE_NONE, 'Forces installation from package dist even for dev versions.'),
@ -50,7 +50,9 @@ class RequireCommand extends InitCommand
new InputOption('sort-packages', null, InputOption::VALUE_NONE, 'Sorts packages when adding/updating a new dependency'),
))
->setHelp(<<<EOT
The require command adds required packages to your composer.json and installs them
The require command adds required packages to your composer.json and installs them.
If you do not specify a version constraint, composer will choose a suitable one based on the available package versions.
If you do not want to install the new dependencies immediately you can call it with --no-update
if ($this->config && in_array($this->originUrl, $this->config->get('github-domains'), true)) {
$message = "\n".'Could not fetch '.$this->fileUrl.', enter your GitHub credentials '.($httpStatus === 404 ? 'to access private repos' : 'to go over the API rate limit');
$gitHubUtil = new GitHub($this->io, $this->config, null, $this);
$gitHubUtil = new GitHub($this->io, $this->config, null);
if (!$gitHubUtil->authorizeOAuth($this->originUrl)