|
@@ -122,6 +122,27 @@ class ComposerRepository extends ArrayRepository implements NotifiableRepository
|
|
|
return $this->minimalPackages;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * {@inheritDoc}
|
|
|
+ */
|
|
|
+ public function filterPackages($callback, $class = 'Composer\Package\Package')
|
|
|
+ {
|
|
|
+ $repoData = $this->loadDataFromServer();
|
|
|
+
|
|
|
+ foreach ($repoData as $package) {
|
|
|
+ if (false === $callback($package = $this->loader->load($package, $class))) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if ($package->getAlias()) {
|
|
|
+ if (false === $callback($this->createAliasPackage($package))) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* {@inheritDoc}
|
|
|
*/
|
|
@@ -154,7 +175,7 @@ class ComposerRepository extends ArrayRepository implements NotifiableRepository
|
|
|
$repoData = $this->loadDataFromServer();
|
|
|
|
|
|
foreach ($repoData as $package) {
|
|
|
- $this->addPackage($this->loader->load($package, 'Composer\Package\Package'));
|
|
|
+ $this->addPackage($this->loader->load($package, 'Composer\Package\CompletePackage'));
|
|
|
}
|
|
|
}
|
|
|
|