Skip to content

Commit

Permalink
🚑 Moves loadInstalledPaths from init to onDependenciesChangedEvent (#51)
Browse files Browse the repository at this point in the history
* Move loadInstalledPaths from init to onDependenciesChangedEvent

* Use versioned release of sensiolabs/security-checker for PHP 5 compatibility
  • Loading branch information
gapple authored and frenck committed Oct 25, 2018
1 parent 2574d4f commit d2042de
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand Down Expand Up @@ -154,6 +152,7 @@ public function onDependenciesChangedEvent()
}

if ($this->isPHPCodeSnifferInstalled() === true) {
$this->loadInstalledPaths();
$installPathCleaned = $this->cleanInstalledPaths();
$installPathUpdated = $this->updateInstalledPaths();

Expand Down

0 comments on commit d2042de

Please sign in to comment.