1
0
Fork 0

Update docs, fix tests

pull/1644/head
Jordi Boggiano 2013-03-03 17:18:50 +01:00
parent 73adf29602
commit c32470c7df
5 changed files with 21 additions and 15 deletions

View File

@ -76,6 +76,8 @@ resolution.
* **--dev:** By default composer will only install required packages. By * **--dev:** By default composer will only install required packages. By
passing this option you can also make it install packages referenced by passing this option you can also make it install packages referenced by
`require-dev`. `require-dev`.
* **--no-dev:** Skip installing packages listed in `require-dev` (this is
the default for `install`).
* **--no-scripts:** Skips execution of scripts defined in `composer.json`. * **--no-scripts:** Skips execution of scripts defined in `composer.json`.
* **--no-custom-installers:** Disables custom installers. * **--no-custom-installers:** Disables custom installers.
* **--no-progress:** Removes the progress display that can mess with some * **--no-progress:** Removes the progress display that can mess with some
@ -107,7 +109,8 @@ You can also use wildcards to update a bunch of packages at once:
* **--prefer-source:** Install packages from `source` when available. * **--prefer-source:** Install packages from `source` when available.
* **--prefer-dist:** Install packages from `dist` when available. * **--prefer-dist:** Install packages from `dist` when available.
* **--dry-run:** Simulate the command without actually doing anything. * **--dry-run:** Simulate the command without actually doing anything.
* **--dev:** Install packages listed in `require-dev`. * **--dev:** Install packages listed in `require-dev` (this is the default for `update`).
* **--no-dev:** Skip installing packages listed in `require-dev`.
* **--no-scripts:** Skips execution of scripts defined in `composer.json`. * **--no-scripts:** Skips execution of scripts defined in `composer.json`.
* **--no-custom-installers:** Disables custom installers. * **--no-custom-installers:** Disables custom installers.
* **--no-progress:** Removes the progress display that can mess with some * **--no-progress:** Removes the progress display that can mess with some
@ -190,7 +193,6 @@ specific version.
* **--installed (-i):** List the packages that are installed. * **--installed (-i):** List the packages that are installed.
* **--platform (-p):** List only platform packages (php & extensions). * **--platform (-p):** List only platform packages (php & extensions).
* **--self (-s):** List the root package info. * **--self (-s):** List the root package info.
* **--dev:** Include dev-required packages when combined with **--installed** or **--platform**.
## depends ## depends

View File

@ -296,17 +296,7 @@ unless those requirements can be met.
Lists packages required for developing this package, or running Lists packages required for developing this package, or running
tests, etc. The dev requirements of the root package only will be installed tests, etc. The dev requirements of the root package only will be installed
if `install` or `update` is ran with `--dev`. if `install` is run with `--dev` or if `update` is run without `--no-dev`.
Packages listed here and their dependencies can not overrule the resolution
found with the packages listed in require. This is even true if a different
version of a package would be installable and solve the conflict. The reason
is that `install --dev` produces the exact same state as just `install`, apart
from the additional dev packages.
If you run into such a conflict, you can specify the conflicting package in
the require section and require the right version number to resolve the
conflict.
#### conflict #### conflict

View File

@ -51,8 +51,8 @@ class InstallerInstallerTest extends \PHPUnit_Framework_TestCase
->disableOriginalConstructor() ->disableOriginalConstructor()
->getMock(); ->getMock();
$rm->expects($this->any()) $rm->expects($this->any())
->method('getLocalRepositories') ->method('getLocalRepository')
->will($this->returnValue(array($this->repository))); ->will($this->returnValue($this->repository));
$this->io = $this->getMock('Composer\IO\IOInterface'); $this->io = $this->getMock('Composer\IO\IOInterface');

View File

@ -29,6 +29,19 @@ use Symfony\Component\Console\Output\StreamOutput;
class InstallerTest extends TestCase class InstallerTest extends TestCase
{ {
protected $prevCwd;
public function setUp()
{
$this->prevCwd = getcwd();
chdir(__DIR__);
}
public function tearDown()
{
chdir($this->prevCwd);
}
/** /**
* @dataProvider provideInstaller * @dataProvider provideInstaller
*/ */

View File

@ -13,6 +13,7 @@ namespace Composer\Test\Mock;
use Composer\Installer\InstallationManager; use Composer\Installer\InstallationManager;
use Composer\Repository\RepositoryInterface; use Composer\Repository\RepositoryInterface;
use Composer\Repository\InstalledRepositoryInterface;
use Composer\Package\PackageInterface; use Composer\Package\PackageInterface;
use Composer\DependencyResolver\Operation\InstallOperation; use Composer\DependencyResolver\Operation\InstallOperation;
use Composer\DependencyResolver\Operation\UpdateOperation; use Composer\DependencyResolver\Operation\UpdateOperation;