Merge branch 'master' of github.com:fvdb/composer into add-minor-only-option
commit
79d1a050e3
|
@ -2,7 +2,7 @@ Contributing to Composer
|
||||||
========================
|
========================
|
||||||
|
|
||||||
Please note that this project is released with a
|
Please note that this project is released with a
|
||||||
[Contributor Code of Conduct](http://contributor-covenant.org/version/1/2/0/).
|
[Contributor Code of Conduct](http://contributor-covenant.org/version/1/4/).
|
||||||
By participating in this project you agree to abide by its terms.
|
By participating in this project you agree to abide by its terms.
|
||||||
|
|
||||||
Reporting Issues
|
Reporting Issues
|
||||||
|
|
39
README.md
39
README.md
|
@ -1,7 +1,7 @@
|
||||||
Composer - Dependency Management for PHP
|
Composer - Dependency Management for PHP
|
||||||
========================================
|
========================================
|
||||||
|
|
||||||
Composer helps you declare, manage and install dependencies of PHP projects, ensuring you have the right stack everywhere.
|
Composer helps you declare, manage and install dependencies of PHP projects.
|
||||||
|
|
||||||
See [https://getcomposer.org/](https://getcomposer.org/) for more information and documentation.
|
See [https://getcomposer.org/](https://getcomposer.org/) for more information and documentation.
|
||||||
|
|
||||||
|
@ -12,33 +12,12 @@ See [https://getcomposer.org/](https://getcomposer.org/) for more information an
|
||||||
Installation / Usage
|
Installation / Usage
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
1. Download and install Composer by following the [official instructions](https://getcomposer.org/download/).
|
Download and install Composer by following the [official instructions](https://getcomposer.org/download/).
|
||||||
2. Create a composer.json defining your dependencies. Note that this example is
|
|
||||||
a short version for applications that are not meant to be published as packages
|
|
||||||
themselves. To create libraries/packages please read the
|
|
||||||
[documentation](https://getcomposer.org/doc/02-libraries.md).
|
|
||||||
|
|
||||||
``` json
|
Packages
|
||||||
{
|
--------
|
||||||
"require": {
|
|
||||||
"monolog/monolog": ">=1.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Run Composer: `php composer.phar install`
|
Find packages on [Packagist](https://packagist.org).
|
||||||
4. Browse for more packages on [Packagist](https://packagist.org).
|
|
||||||
|
|
||||||
Global installation of Composer (manual)
|
|
||||||
----------------------------------------
|
|
||||||
|
|
||||||
Follow instructions [in the documentation](https://getcomposer.org/doc/00-intro.md#globally)
|
|
||||||
|
|
||||||
Updating Composer
|
|
||||||
-----------------
|
|
||||||
|
|
||||||
Running `php composer.phar self-update` or equivalent will update a phar
|
|
||||||
install to the latest version.
|
|
||||||
|
|
||||||
Community
|
Community
|
||||||
---------
|
---------
|
||||||
|
@ -50,7 +29,7 @@ For support, Stack Overflow also offers a good collection of
|
||||||
[Composer related questions](https://stackoverflow.com/questions/tagged/composer-php).
|
[Composer related questions](https://stackoverflow.com/questions/tagged/composer-php).
|
||||||
|
|
||||||
Please note that this project is released with a
|
Please note that this project is released with a
|
||||||
[Contributor Code of Conduct](http://contributor-covenant.org/version/1/2/0/).
|
[Contributor Code of Conduct](http://contributor-covenant.org/version/1/4/).
|
||||||
By participating in this project and its community you agree to abide by those terms.
|
By participating in this project and its community you agree to abide by those terms.
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
|
@ -61,15 +40,15 @@ PHP 5.3.2 or above (at least 5.3.4 recommended to avoid potential bugs)
|
||||||
Authors
|
Authors
|
||||||
-------
|
-------
|
||||||
|
|
||||||
Nils Adermann - <naderman@naderman.de> - <https://twitter.com/naderman> - <http://www.naderman.de><br />
|
- Nils Adermann | [GitHub](https://github.com/naderman) | [Twitter](https://twitter.com/naderman) | <naderman@naderman.de> | [naderman.de](http://naderman.de)
|
||||||
Jordi Boggiano - <j.boggiano@seld.be> - <https://twitter.com/seldaek> - <http://seld.be><br />
|
- Jordi Boggiano | [GitHub](https://github.com/Seldaek) | [Twitter](https://twitter.com/seldaek) | <j.boggiano@seld.be> | [seld.be](http://seld.be)
|
||||||
|
|
||||||
See also the list of [contributors](https://github.com/composer/composer/contributors) who participated in this project.
|
See also the list of [contributors](https://github.com/composer/composer/contributors) who participated in this project.
|
||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
|
|
||||||
Composer is licensed under the MIT License - see the LICENSE file for details
|
Composer is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
|
||||||
|
|
||||||
Acknowledgments
|
Acknowledgments
|
||||||
---------------
|
---------------
|
||||||
|
|
|
@ -99,6 +99,7 @@ resolution.
|
||||||
* **--no-scripts:** Skips execution of scripts defined in `composer.json`.
|
* **--no-scripts:** Skips execution of scripts defined in `composer.json`.
|
||||||
* **--no-progress:** Removes the progress display that can mess with some
|
* **--no-progress:** Removes the progress display that can mess with some
|
||||||
terminals or scripts which don't handle backspace characters.
|
terminals or scripts which don't handle backspace characters.
|
||||||
|
* **--no-suggest:** Skips suggested packages in the output.
|
||||||
* **--optimize-autoloader (-o):** Convert PSR-0/4 autoloading to classmap to get a faster
|
* **--optimize-autoloader (-o):** Convert PSR-0/4 autoloading to classmap to get a faster
|
||||||
autoloader. This is recommended especially for production, but can take
|
autoloader. This is recommended especially for production, but can take
|
||||||
a bit of time to run so it is currently not done by default.
|
a bit of time to run so it is currently not done by default.
|
||||||
|
@ -143,6 +144,7 @@ php composer.phar update vendor/*
|
||||||
* **--no-scripts:** Skips execution of scripts defined in `composer.json`.
|
* **--no-scripts:** Skips execution of scripts defined in `composer.json`.
|
||||||
* **--no-progress:** Removes the progress display that can mess with some
|
* **--no-progress:** Removes the progress display that can mess with some
|
||||||
terminals or scripts which don't handle backspace characters.
|
terminals or scripts which don't handle backspace characters.
|
||||||
|
* **--no-suggest:** Skips suggested packages in the output.
|
||||||
* **--optimize-autoloader (-o):** Convert PSR-0/4 autoloading to classmap to get a faster
|
* **--optimize-autoloader (-o):** Convert PSR-0/4 autoloading to classmap to get a faster
|
||||||
autoloader. This is recommended especially for production, but can take
|
autoloader. This is recommended especially for production, but can take
|
||||||
a bit of time to run so it is currently not done by default.
|
a bit of time to run so it is currently not done by default.
|
||||||
|
|
|
@ -53,8 +53,8 @@ class ClassLoader
|
||||||
|
|
||||||
private $useIncludePath = false;
|
private $useIncludePath = false;
|
||||||
private $classMap = array();
|
private $classMap = array();
|
||||||
|
|
||||||
private $classMapAuthoritative = false;
|
private $classMapAuthoritative = false;
|
||||||
|
private $missingClasses = array();
|
||||||
|
|
||||||
public function getPrefixes()
|
public function getPrefixes()
|
||||||
{
|
{
|
||||||
|
@ -322,20 +322,20 @@ class ClassLoader
|
||||||
if (isset($this->classMap[$class])) {
|
if (isset($this->classMap[$class])) {
|
||||||
return $this->classMap[$class];
|
return $this->classMap[$class];
|
||||||
}
|
}
|
||||||
if ($this->classMapAuthoritative) {
|
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$file = $this->findFileWithExtension($class, '.php');
|
$file = $this->findFileWithExtension($class, '.php');
|
||||||
|
|
||||||
// Search for Hack files if we are running on HHVM
|
// Search for Hack files if we are running on HHVM
|
||||||
if ($file === null && defined('HHVM_VERSION')) {
|
if (false === $file && defined('HHVM_VERSION')) {
|
||||||
$file = $this->findFileWithExtension($class, '.hh');
|
$file = $this->findFileWithExtension($class, '.hh');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($file === null) {
|
if (false === $file) {
|
||||||
// Remember that this class does not exist.
|
// Remember that this class does not exist.
|
||||||
return $this->classMap[$class] = false;
|
$this->missingClasses[$class] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $file;
|
return $file;
|
||||||
|
@ -399,6 +399,8 @@ class ClassLoader
|
||||||
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -296,7 +296,7 @@ class Application extends BaseApplication
|
||||||
}
|
}
|
||||||
|
|
||||||
if (false !== strpos($exception->getMessage(), 'fork failed - Cannot allocate memory')) {
|
if (false !== strpos($exception->getMessage(), 'fork failed - Cannot allocate memory')) {
|
||||||
$io->writeError('<error>The following exception is caused by a lack of memory and not having swap configured</error>', true, IOInterface::QUIET);
|
$io->writeError('<error>The following exception is caused by a lack of memory or swap, or not having swap configured</error>', true, IOInterface::QUIET);
|
||||||
$io->writeError('<error>Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details</error>', true, IOInterface::QUIET);
|
$io->writeError('<error>Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details</error>', true, IOInterface::QUIET);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -234,7 +234,12 @@ class Git
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$authFailures = array('fatal: Authentication failed', 'remote error: Invalid username or password.');
|
$authFailures = array(
|
||||||
|
'fatal: Authentication failed',
|
||||||
|
'remote error: Invalid username or password.',
|
||||||
|
'error: 401 Unauthorized'
|
||||||
|
);
|
||||||
|
|
||||||
foreach ($authFailures as $authFailure) {
|
foreach ($authFailures as $authFailure) {
|
||||||
if (strpos($this->process->getErrorOutput(), $authFailure) !== false) {
|
if (strpos($this->process->getErrorOutput(), $authFailure) !== false) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -183,6 +183,7 @@ class AllFunctionalTest extends TestCase
|
||||||
|
|
||||||
case 'EXPECT-EXIT-CODE':
|
case 'EXPECT-EXIT-CODE':
|
||||||
$sectionData = (integer) $sectionData;
|
$sectionData = (integer) $sectionData;
|
||||||
|
break;
|
||||||
|
|
||||||
case 'EXPECT':
|
case 'EXPECT':
|
||||||
case 'EXPECT-REGEX':
|
case 'EXPECT-REGEX':
|
||||||
|
|
Loading…
Reference in New Issue