diff --git a/.travis.yml b/.travis.yml index 61cd347..8f90b26 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,6 @@ env: - COMPOSER_ARGS="--no-interaction" matrix: - fast_finish: true include: - php: 5.6 env: @@ -24,11 +23,11 @@ matrix: - php: 5.6 env: - DEPS=locked - - TEST_COVERAGE=true - LEGACY_DEPS="phpunit/phpunit zendframework/zend-code" - php: 5.6 env: - DEPS=latest + - TEST_COVERAGE=true - php: 7 env: - DEPS=lowest @@ -85,8 +84,7 @@ install: - stty cols 120 && composer show script: - - if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; fi - - if [[ $TEST_COVERAGE != 'true' ]]; then composer test ; fi + - if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi - if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi after_script: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a9401e3..22d45b8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -77,24 +77,24 @@ To do so: ## Running Coding Standards Checks -This component uses [php-cs-fixer](http://cs.sensiolabs.org/) for coding +This component uses [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) for coding standards checks, and provides configuration for our selected checks. -`php-cs-fixer` is installed by default via Composer. +`phpcs` is installed by default via Composer. To run checks only: ```console -$ ./vendor/bin/php-cs-fixer fix . -v --diff --dry-run --config-file=.php_cs +$ composer cs-check ``` -To have `php-cs-fixer` attempt to fix problems for you, omit the `--dry-run` -flag: +`phpcs` also includes a tool for fixing most CS violations, `phpcbf`: + ```console -$ ./vendor/bin/php-cs-fixer fix . -v --diff --config-file=.php_cs +$ composer cs-fix ``` -If you allow php-cs-fixer to fix CS issues, please re-run the tests to ensure +If you allow `phpcbf` to fix CS issues, please re-run the tests to ensure they pass, and make sure you add and commit the changes after verification. ## Recommended Workflow for Contributions diff --git a/phpcs.xml b/phpcs.xml index 3162186..25521bf 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -5,6 +5,4 @@ src test - test/_files/* - test/TestAsset/*