1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Refactor Installer class into separate install and update processes

- Introduce separate Lock and LocalRepo transactions, one for changes
  to the lock file, one for changes to locally installed packages based
  on lock file
- Remove various hacks to keep dev dependencies updated and
  incorporated the functionality into the transaction classes
- Remove installed repo, there are now local repo, locked repo and
  platform repo
- Remove access to local repo from solver, only supply locked packages
- Update can now be run to modify the lock file but not install packages
  to local repo
This commit is contained in:
Nils Adermann 2018-09-13 15:23:05 +02:00
parent 1211ba1d51
commit 10ada7bf82
21 changed files with 945 additions and 1156 deletions

View file

@ -31,14 +31,12 @@ class RequestTest extends TestCase
$request = new Request();
$request->install('foo');
$request->fix('bar');
$request->remove('foobar');
$this->assertEquals(
array(
array('cmd' => 'install', 'packageName' => 'foo', 'constraint' => null, 'fixed' => false),
array('cmd' => 'install', 'packageName' => 'bar', 'constraint' => null, 'fixed' => true),
array('cmd' => 'remove', 'packageName' => 'foobar', 'constraint' => null, 'fixed' => false),
array('cmd' => 'install', 'packageName' => 'foo', 'constraint' => null),
array('cmd' => 'remove', 'packageName' => 'foobar', 'constraint' => null),
),
$request->getJobs()
);
@ -60,21 +58,9 @@ class RequestTest extends TestCase
$this->assertEquals(
array(
array('cmd' => 'install', 'packageName' => 'foo', 'constraint' => $constraint, 'fixed' => false),
array('cmd' => 'install', 'packageName' => 'foo', 'constraint' => $constraint),
),
$request->getJobs()
);
}
public function testUpdateAll()
{
$request = new Request();
$request->updateAll();
$this->assertEquals(
array(array('cmd' => 'update-all')),
$request->getJobs()
);
}
}