1
0
Fork 0

Fake a dev lock when a non-dev update is made and there are actually no dev requirements

pull/1491/merge
Jordi Boggiano 2013-03-06 22:20:03 +01:00
parent d1e502d998
commit 60204f9227
1 changed files with 4 additions and 1 deletions

View File

@ -226,9 +226,12 @@ class Installer
if (!$this->dryRun) {
// write lock
if ($this->update || !$this->locker->isLocked()) {
$devPackages = $this->devMode ? array() : null;
$localRepo->reload();
// if this is not run in dev mode and the root has dev requires, the lock must
// contain null to prevent dev installs from a non-dev lock
$devPackages = ($this->devMode || !$this->package->getDevRequires()) ? array() : null;
// 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()) {
$policy = new DefaultPolicy();