Browse Source

Avoid loading plugins that have had their code wiped from filesystem, fixes #3115, closes #3538

Jordi Boggiano 10 years ago
parent
commit
cc4223e6f9
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/Composer/Factory.php

+ 3 - 3
src/Composer/Factory.php

@@ -284,13 +284,13 @@ class Factory
         $pm = $this->createPluginManager($composer, $io, $globalRepository);
         $composer->setPluginManager($pm);
 
+        // purge packages if they have been deleted on the filesystem
+        $this->purgePackages($rm, $im);
+
         if (!$disablePlugins) {
             $pm->loadInstalledPlugins();
         }
 
-        // purge packages if they have been deleted on the filesystem
-        $this->purgePackages($rm, $im);
-
         // init locker if possible
         if (isset($composerFile)) {
             $lockFile = "json" === pathinfo($composerFile, PATHINFO_EXTENSION)