From d2042def1a63e4d11fbca26510e714ef1b9e75dd Mon Sep 17 00:00:00 2001 From: Geoff Date: Thu, 25 Oct 2018 04:07:22 -0700 Subject: [PATCH] :ambulance: Moves loadInstalledPaths from init to onDependenciesChangedEvent (#51) * Move loadInstalledPaths from init to onDependenciesChangedEvent * Use versioned release of sensiolabs/security-checker for PHP 5 compatibility --- src/Plugin.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Plugin.php b/src/Plugin.php index f128e720..6a10f780 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -117,8 +117,6 @@ private function init() $this->processBuilder = new ProcessBuilder(); $this->processBuilder->setPrefix($this->composer->getConfig()->get('bin-dir') . DIRECTORY_SEPARATOR . 'phpcs'); - - $this->loadInstalledPaths(); } /** @@ -154,6 +152,7 @@ public function onDependenciesChangedEvent() } if ($this->isPHPCodeSnifferInstalled() === true) { + $this->loadInstalledPaths(); $installPathCleaned = $this->cleanInstalledPaths(); $installPathUpdated = $this->updateInstalledPaths();