diff --git a/src/Flex.php b/src/Flex.php index 36a822dfd..015720389 100644 --- a/src/Flex.php +++ b/src/Flex.php @@ -256,7 +256,7 @@ public function configureInstaller() $backtrace = debug_backtrace(); foreach ($backtrace as $trace) { if (isset($trace['object']) && $trace['object'] instanceof Installer) { - $this->installer = $trace['object']; + $this->installer = \Closure::bind(function () { return $this->update ? $this : null; }, $trace['object'], $trace['object'])(); $trace['object']->setSuggestedPackagesReporter(new SuggestedPackagesReporter(new NullIO())); break; } @@ -315,7 +315,7 @@ public function checkForUpdate(PackageEvent $event) } $this->update(); - + $this->cacheDirPopulated = true; $this->composer->getInstallationManager()->addInstaller(new NoopInstaller()); \Closure::bind(function () {