Skip to content

Commit

Permalink
Merge dfbeb77 into 19d2b54
Browse files Browse the repository at this point in the history
  • Loading branch information
kpicaza authored Oct 27, 2020
2 parents 19d2b54 + dfbeb77 commit 0bc4955
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ComponentInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ public function activate(Composer $composer, IOInterface $io)
$this->composer = $composer;
$this->io = $io;
$this->cachedInjectors = [];
$this->packageProviderFactory = PackageProviderDetectionFactory::create($composer);
$this->packageProviderFactory = function () {
return PackageProviderDetectionFactory::create($this->composer);
};
}

/**
Expand Down Expand Up @@ -219,6 +221,10 @@ public function onPostPackageInstall(PackageEvent $event)
return;
}

$this->packageProviderFactory = is_callable($this->packageProviderFactory)
? ($this->packageProviderFactory)()
: $this->packageProviderFactory;

$packageProviderDetection = $this->packageProviderFactory->detect($event, $name);
$requireDev = $this->isADevDependency($packageProviderDetection, $package);
$dependencies = $this->loadModuleClassesDependencies($package);
Expand Down

0 comments on commit 0bc4955

Please sign in to comment.