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:
parent
1211ba1d51
commit
10ada7bf82
21 changed files with 945 additions and 1156 deletions
|
@ -30,6 +30,7 @@ class SolverTest extends TestCase
|
|||
protected $repoSet;
|
||||
protected $repo;
|
||||
protected $repoInstalled;
|
||||
protected $repoLocked;
|
||||
protected $request;
|
||||
protected $policy;
|
||||
protected $solver;
|
||||
|
@ -39,6 +40,7 @@ class SolverTest extends TestCase
|
|||
$this->repoSet = new RepositorySet(array());
|
||||
$this->repo = new ArrayRepository;
|
||||
$this->repoInstalled = new InstalledArrayRepository;
|
||||
$this->repoLocked = new ArrayRepository;
|
||||
|
||||
$this->request = new Request($this->repoSet);
|
||||
$this->policy = new DefaultPolicy;
|
||||
|
@ -59,6 +61,7 @@ class SolverTest extends TestCase
|
|||
public function testSolverRemoveIfNotInstalled()
|
||||
{
|
||||
$this->repoInstalled->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repoLocked->addPackage(clone $packageA);
|
||||
$this->reposComplete();
|
||||
|
||||
$this->checkSolverResult(array(
|
||||
|
@ -919,8 +922,8 @@ class SolverTest extends TestCase
|
|||
|
||||
protected function reposComplete()
|
||||
{
|
||||
$this->repoSet->addRepository($this->repoInstalled);
|
||||
$this->repoSet->addRepository($this->repo);
|
||||
$this->repoSet->addRepository($this->repoLocked);
|
||||
}
|
||||
|
||||
protected function createSolver()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue