Skip to content

Commit

Permalink
Execute phpcs and security-checker from vendor/bin
Browse files Browse the repository at this point in the history
  • Loading branch information
Geoff Appleby committed Jul 12, 2018
1 parent 2e41850 commit c87e554
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
12 changes: 2 additions & 10 deletions .travis.yml
Expand Up @@ -15,12 +15,6 @@ php:
# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false

# Make sure a `bin` directory is present and does not contain PHAR files more
# than 4 weeks old
before_cache:
- mkdir -p "${HOME}/bin"
- find "${HOME}/bin/" -type f -name '*.phar' -mtime +28 -delete

cache:
directories:
- "${HOME}/.composer/cache"
Expand All @@ -43,14 +37,12 @@ before_install:
- npm set progress false

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'
- npm install -g jsonlint

script:
- find . -type f -name "*.json" -print0 | xargs -0 -n1 jsonlint -q
- find . -type f -name "*.php" -print0 | xargs -0 -n1 php -l
- 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
- ./vendor/bin/phpcs --standard=psr2 src/
- ./vendor/bin/security-checker -n security:check --end-point=http://security.sensiolabs.org/check_lock
1 change: 1 addition & 0 deletions composer.json
Expand Up @@ -30,6 +30,7 @@
},
"require-dev": {
"composer/composer": "*",
"sensiolabs/security-checker": "4.1.5",
"wimg/php-compatibility": "^8.0"
},
"suggest": {
Expand Down

0 comments on commit c87e554

Please sign in to comment.