Always dump packages, even if only an alias is added, fixes #1809
parent
606f5839f1
commit
33af9eea95
|
@ -197,6 +197,10 @@ EOF;
|
||||||
$packageMap = array(array($mainPackage, ''));
|
$packageMap = array(array($mainPackage, ''));
|
||||||
|
|
||||||
foreach ($packages as $package) {
|
foreach ($packages as $package) {
|
||||||
|
// unfold aliased packages
|
||||||
|
while ($package instanceof AliasPackage && !in_array($package->getAliasOf(), $packages, true)) {
|
||||||
|
$package = $package->getAliasOf();
|
||||||
|
}
|
||||||
if ($package instanceof AliasPackage) {
|
if ($package instanceof AliasPackage) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,15 +76,19 @@ class FilesystemRepository extends ArrayRepository implements WritableRepository
|
||||||
*/
|
*/
|
||||||
public function write()
|
public function write()
|
||||||
{
|
{
|
||||||
$packages = array();
|
$data = array();
|
||||||
$dumper = new ArrayDumper();
|
$dumper = new ArrayDumper();
|
||||||
foreach ($this->getPackages() as $package) {
|
$packages = $this->getPackages();
|
||||||
|
foreach ($packages as $package) {
|
||||||
|
// unfold aliased packages
|
||||||
|
while ($package instanceof AliasPackage && !in_array($package->getAliasOf(), $packages, true)) {
|
||||||
|
$package = $package->getAliasOf();
|
||||||
|
}
|
||||||
if (!$package instanceof AliasPackage) {
|
if (!$package instanceof AliasPackage) {
|
||||||
$data = $dumper->dump($package);
|
$data[] = $dumper->dump($package);
|
||||||
$packages[] = $data;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->file->write($packages);
|
$this->file->write($data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue