From 2c45ce0824d9f65a1c5f1d7929ea261da3869e72 Mon Sep 17 00:00:00 2001 From: Geoff Appleby Date: Wed, 11 Jul 2018 15:37:05 -0700 Subject: [PATCH 1/2] Move loadInstalledPaths from init to onDependenciesChangedEvent --- src/Plugin.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Plugin.php b/src/Plugin.php index b12a6ccd..5b05a861 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(); From a93caad6bf91869b127cfcdc196c27d46cf6b3c6 Mon Sep 17 00:00:00 2001 From: Geoff Appleby Date: Thu, 12 Jul 2018 11:50:43 -0700 Subject: [PATCH 2/2] Use versioned release of sensiolabs/security-checker for PHP 5 compatibility --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 00f1f509..465e424b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,7 +44,7 @@ before_install: install: - '[[ -f "${HOME}/bin/phpcs.phar" ]] || curl -L -o "${HOME}/bin/phpcs.phar" https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar' - - '[[ -f "${HOME}/bin/security-checker.phar" ]] || curl -L -o "${HOME}/bin/security-checker.phar" http://get.sensiolabs.org/security-checker.phar' + - '[[ -f "${HOME}/bin/security-checker-v4.1.5.phar" ]] || curl -L -o "${HOME}/bin/security-checker-v4.1.5.phar" http://get.sensiolabs.org/security-checker-v4.1.5.phar' - npm install -g jsonlint script: @@ -53,4 +53,4 @@ script: - php "${HOME}/bin/phpcs.phar" --standard=psr2 src/ - composer validate - travis_wait composer install --no-interaction --no-progress --no-scripts --no-suggest --optimize-autoloader --prefer-dist --verbose - - php "${HOME}/bin/security-checker.phar" -n security:check --end-point=http://security.sensiolabs.org/check_lock + - php "${HOME}/bin/security-checker-v4.1.5.phar" -n security:check --end-point=http://security.sensiolabs.org/check_lock