Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execute phpcs and security-checker from vendor/bin #52

Merged
merged 2 commits into from Sep 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 2 additions & 11 deletions .travis.yml
Expand Up @@ -15,17 +15,10 @@ 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"
- "${HOME}/.npm/"
- "${HOME}/bin/"
env:
global:
- PATH="${HOME}/bin:${PATH}"
Expand All @@ -43,14 +36,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.0",
"phpcompatibility/php-compatibility": "^8.0"
},
"suggest": {
Expand Down