From 04605e4f90da8ac37119789734dc81b36f9efa1a Mon Sep 17 00:00:00 2001 From: Rob Bast Date: Mon, 25 Jul 2016 09:00:12 +0200 Subject: [PATCH 1/9] update ccoc to v1.4 --- .github/CONTRIBUTING.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 6c3be2943..ec1e3bc22 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -2,7 +2,7 @@ Contributing to Composer ======================== 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. Reporting Issues diff --git a/README.md b/README.md index 1d011132f..637b9b688 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ For support, Stack Overflow also offers a good collection of [Composer related questions](https://stackoverflow.com/questions/tagged/composer-php). 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. Requirements From a480e53234e2b1c31ed5fbee1938417abca6e567 Mon Sep 17 00:00:00 2001 From: Rob Bast Date: Mon, 25 Jul 2016 09:01:02 +0200 Subject: [PATCH 2/9] simplify the readme, defer to documentation --- README.md | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 637b9b688..72308c2dd 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ 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. @@ -12,33 +12,12 @@ See [https://getcomposer.org/](https://getcomposer.org/) for more information an Installation / Usage -------------------- -1. 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). +Download and install Composer by following the [official instructions](https://getcomposer.org/download/). - ``` json - { - "require": { - "monolog/monolog": ">=1.0.0" - } - } - ``` +Packages +-------- -3. Run Composer: `php composer.phar install` -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. +Find packages on [Packagist](https://packagist.org). Community --------- From 02455712cf1ff9f348ef402e311d4496faf3a528 Mon Sep 17 00:00:00 2001 From: Rob Bast Date: Tue, 26 Jul 2016 11:46:51 +0200 Subject: [PATCH 3/9] check for additional possible output strings, fixes #5543 --- src/Composer/Util/Git.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Composer/Util/Git.php b/src/Composer/Util/Git.php index 596188fe6..8edbbec37 100644 --- a/src/Composer/Util/Git.php +++ b/src/Composer/Util/Git.php @@ -234,7 +234,12 @@ class Git 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) { if (strpos($this->process->getErrorOutput(), $authFailure) !== false) { return true; From c28ee623ae9d88c67d57df885f406ca63a029b0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=BCschel?= Date: Wed, 27 Jul 2016 17:44:15 -0400 Subject: [PATCH 4/9] add link to license file --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 72308c2dd..a63a3d656 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ See also the list of [contributors](https://github.com/composer/composer/contrib 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 --------------- From 1bc0f8e0e9d2dfe43e98a26811514d330c6ae741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=BCschel?= Date: Wed, 27 Jul 2016 18:01:27 -0400 Subject: [PATCH 5/9] reformat author section --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a63a3d656..23ae7a172 100644 --- a/README.md +++ b/README.md @@ -40,8 +40,8 @@ PHP 5.3.2 or above (at least 5.3.4 recommended to avoid potential bugs) Authors ------- -Nils Adermann - - -
-Jordi Boggiano - - -
+- Nils Adermann | [GitHub](https://github.com/naderman) | [Twitter](https://twitter.com/naderman) | | [naderman.de](http://naderman.de) +- Jordi Boggiano | [GitHub](https://github.com/Seldaek) | [Twitter](https://twitter.com/seldaek) | | [seld.be](http://seld.be) See also the list of [contributors](https://github.com/composer/composer/contributors) who participated in this project. From dd67b01ac51f973f3c37f4a9a3b17ec9ebfa07c4 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 28 Jul 2016 10:31:08 +0200 Subject: [PATCH 6/9] Add ClassLoader::$missingClasses to not trigger a COW --- src/Composer/Autoload/ClassLoader.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Composer/Autoload/ClassLoader.php b/src/Composer/Autoload/ClassLoader.php index ff6ecfb82..ac67d302a 100644 --- a/src/Composer/Autoload/ClassLoader.php +++ b/src/Composer/Autoload/ClassLoader.php @@ -53,8 +53,8 @@ class ClassLoader private $useIncludePath = false; private $classMap = array(); - private $classMapAuthoritative = false; + private $missingClasses = array(); public function getPrefixes() { @@ -322,20 +322,20 @@ class ClassLoader if (isset($this->classMap[$class])) { return $this->classMap[$class]; } - if ($this->classMapAuthoritative) { + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { return false; } $file = $this->findFileWithExtension($class, '.php'); // 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'); } - if ($file === null) { + if (false === $file) { // Remember that this class does not exist. - return $this->classMap[$class] = false; + $this->missingClasses[$class] = true; } return $file; @@ -399,6 +399,8 @@ class ClassLoader if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { return $file; } + + return false; } } From c55fd9bd10a2f1d623b51f5ef572b3fa40b51f8c Mon Sep 17 00:00:00 2001 From: Diego Oliveira Date: Tue, 9 Aug 2016 21:31:19 -0300 Subject: [PATCH 7/9] Modify the message for memory errors --- src/Composer/Console/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Console/Application.php b/src/Composer/Console/Application.php index 430f7816c..252ee16b7 100644 --- a/src/Composer/Console/Application.php +++ b/src/Composer/Console/Application.php @@ -296,7 +296,7 @@ class Application extends BaseApplication } if (false !== strpos($exception->getMessage(), 'fork failed - Cannot allocate memory')) { - $io->writeError('The following exception is caused by a lack of memory and not having swap configured', true, IOInterface::QUIET); + $io->writeError('The following exception is caused by a lack of memory or swap, or not having swap configured', true, IOInterface::QUIET); $io->writeError('Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details', true, IOInterface::QUIET); } } From 8625efd551a18f45925100be5e0e00c430d229b3 Mon Sep 17 00:00:00 2001 From: Jad Bitar Date: Mon, 15 Aug 2016 00:30:20 -0400 Subject: [PATCH 8/9] Fix support for testing exit code The `$sectionData` was being overwritten, causing its assertion (`$this->assertSame()`) to fail. --- tests/Composer/Test/AllFunctionalTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Composer/Test/AllFunctionalTest.php b/tests/Composer/Test/AllFunctionalTest.php index 7ef3aa0af..c1751fa3d 100644 --- a/tests/Composer/Test/AllFunctionalTest.php +++ b/tests/Composer/Test/AllFunctionalTest.php @@ -183,6 +183,7 @@ class AllFunctionalTest extends TestCase case 'EXPECT-EXIT-CODE': $sectionData = (integer) $sectionData; + break; case 'EXPECT': case 'EXPECT-REGEX': From c28fe2b507999b550fd24d1fed33651aab2f8700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Ch=C3=A1vez?= Date: Tue, 16 Aug 2016 11:16:20 +0200 Subject: [PATCH 9/9] Adds --no-suggestion flag to the documentation for the install and update commands. --- doc/03-cli.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/03-cli.md b/doc/03-cli.md index 2a6be0911..5beb2fe6e 100644 --- a/doc/03-cli.md +++ b/doc/03-cli.md @@ -99,6 +99,7 @@ resolution. * **--no-scripts:** Skips execution of scripts defined in `composer.json`. * **--no-progress:** Removes the progress display that can mess with some 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 autoloader. This is recommended especially for production, but can take 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-progress:** Removes the progress display that can mess with some 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 autoloader. This is recommended especially for production, but can take a bit of time to run so it is currently not done by default.