From 7740196b1382d244e4c01031d6418dd9c7a9ad08 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 4 Apr 2013 00:47:03 +0200 Subject: [PATCH] Add docs for diag command --- doc/03-cli.md | 8 ++++++++ doc/articles/troubleshooting.md | 9 ++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/doc/03-cli.md b/doc/03-cli.md index de72f0136..69852fc1d 100644 --- a/doc/03-cli.md +++ b/doc/03-cli.md @@ -348,6 +348,14 @@ performance. autoloader. This is recommended especially for production, but can take a bit of time to run so it is currently not done by default. +## diag + +If you think you found a bug, or something is behaving strangely, you might +want to run the `diag` command to perform automated checks for many common +problems. + + $ php composer.phar diag + ## help To get more information about a certain command, just use `help`. diff --git a/doc/articles/troubleshooting.md b/doc/articles/troubleshooting.md index 1282db7b9..3362471eb 100644 --- a/doc/articles/troubleshooting.md +++ b/doc/articles/troubleshooting.md @@ -7,13 +7,16 @@ This is a list of common pitfalls on using Composer, and how to avoid them. ## General -1. When facing any kind of problems using Composer, be sure to **work with the +1. Before asking anyone, run [`composer diag`](../03-cli.md#diag) to check + for common problems. If it all checks out, proceed to the next steps. + +2. When facing any kind of problems using Composer, be sure to **work with the latest version**. See [self-update](../03-cli.md#self-update) for details. -2. Make sure you have no problems with your setup by running the installer's +3. Make sure you have no problems with your setup by running the installer's checks via `curl -sS https://getcomposer.org/installer | php -- --check`. -3. Ensure you're **installing vendors straight from your `composer.json`** via +4. Ensure you're **installing vendors straight from your `composer.json`** via `rm -rf vendor && composer update -v` when troubleshooting, excluding any possible interferences with existing vendor installations or `composer.lock` entries.