Reset package IDs before they can be used in the pool in case there are already some in the cache
parent
541bcabbc0
commit
5978197b5d
|
@ -83,6 +83,7 @@ class Pool
|
||||||
|
|
||||||
if ($repo instanceof ComposerRepository && $repo->hasProviders()) {
|
if ($repo instanceof ComposerRepository && $repo->hasProviders()) {
|
||||||
$this->composerRepos[] = $repo;
|
$this->composerRepos[] = $repo;
|
||||||
|
$repo->resetPackageIds();
|
||||||
} elseif ($repo instanceof StreamableRepositoryInterface) {
|
} elseif ($repo instanceof StreamableRepositoryInterface) {
|
||||||
foreach ($repo->getMinimalPackages() as $package) {
|
foreach ($repo->getMinimalPackages() as $package) {
|
||||||
$name = $package['name'];
|
$name = $package['name'];
|
||||||
|
|
|
@ -199,6 +199,13 @@ class ComposerRepository extends ArrayRepository implements NotifiableRepository
|
||||||
return $this->hasProviders;
|
return $this->hasProviders;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function resetPackageIds()
|
||||||
|
{
|
||||||
|
foreach ($this->providersByUid as $package) {
|
||||||
|
$package->setId(-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function whatProvides(Pool $pool, $name)
|
public function whatProvides(Pool $pool, $name)
|
||||||
{
|
{
|
||||||
// skip platform packages
|
// skip platform packages
|
||||||
|
|
Loading…
Reference in New Issue