Always move time to the end of the package spec in the lock file, fixes #1498
parent
b7cd971b06
commit
0525297ff5
|
@ -287,11 +287,15 @@ class Locker
|
||||||
$spec = $this->dumper->dump($package);
|
$spec = $this->dumper->dump($package);
|
||||||
unset($spec['version_normalized']);
|
unset($spec['version_normalized']);
|
||||||
|
|
||||||
|
// always move time to the end of the package definition
|
||||||
|
$time = isset($spec['time']) ? $spec['time'] : null;
|
||||||
|
unset($spec['time']);
|
||||||
if ($package->isDev()) {
|
if ($package->isDev()) {
|
||||||
$time = $this->getPackageTime($package);
|
// use the exact commit time of the current reference if it's a dev package
|
||||||
if (null !== $time) {
|
$time = $this->getPackageTime($package) ?: $time;
|
||||||
$spec['time'] = $time;
|
}
|
||||||
}
|
if (null !== $time) {
|
||||||
|
$spec['time'] = $time;
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($spec['installation-source']);
|
unset($spec['installation-source']);
|
||||||
|
|
Loading…
Reference in New Issue