|
@@ -234,7 +234,7 @@ class Installer
|
|
|
|
|
|
// split dev and non-dev requirements by checking what would be removed if we update without the dev requirements
|
|
// split dev and non-dev requirements by checking what would be removed if we update without the dev requirements
|
|
if ($this->devMode && $this->package->getDevRequires()) {
|
|
if ($this->devMode && $this->package->getDevRequires()) {
|
|
- $policy = new DefaultPolicy();
|
|
|
|
|
|
+ $policy = $this->createPolicy();
|
|
$pool = $this->createPool();
|
|
$pool = $this->createPool();
|
|
$pool->addRepository($installedRepo, $aliases);
|
|
$pool->addRepository($installedRepo, $aliases);
|
|
|
|
|
|
@@ -308,7 +308,7 @@ class Installer
|
|
$this->io->write('<info>Loading composer repositories with package information</info>');
|
|
$this->io->write('<info>Loading composer repositories with package information</info>');
|
|
|
|
|
|
// creating repository pool
|
|
// creating repository pool
|
|
- $policy = new DefaultPolicy();
|
|
|
|
|
|
+ $policy = $this->createPolicy();
|
|
$pool = $this->createPool();
|
|
$pool = $this->createPool();
|
|
$pool->addRepository($installedRepo, $aliases);
|
|
$pool->addRepository($installedRepo, $aliases);
|
|
if ($installFromLock) {
|
|
if ($installFromLock) {
|
|
@@ -513,6 +513,11 @@ class Installer
|
|
return new Pool($minimumStability, $stabilityFlags);
|
|
return new Pool($minimumStability, $stabilityFlags);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private function createPolicy()
|
|
|
|
+ {
|
|
|
|
+ return new DefaultPolicy($this->package->getPreferStable());
|
|
|
|
+ }
|
|
|
|
+
|
|
private function createRequest(Pool $pool, RootPackageInterface $rootPackage, PlatformRepository $platformRepo)
|
|
private function createRequest(Pool $pool, RootPackageInterface $rootPackage, PlatformRepository $platformRepo)
|
|
{
|
|
{
|
|
$request = new Request($pool);
|
|
$request = new Request($pool);
|