diff --git a/.php_cs b/.php_cs index 541c65c9..01d535af 100644 --- a/.php_cs +++ b/.php_cs @@ -10,7 +10,7 @@ EOF; $finder = PhpCsFixer\Finder::create() ->in(__DIR__) - ->exclude(__DIR__ . '/tests/Fixtures/Integration/Symfony/app/cache') + ->exclude('tests/Fixtures/Integration/Symfony/app/cache') ; return PhpCsFixer\Config::create() diff --git a/.travis.yml b/.travis.yml index 6a695aeb..1accb627 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ branches: env: global: - - CHECK_PHP_SYNTAX="no" + - CHECK_CODE_STYLE="no" - ENABLE_CODE_COVERAGE="no" - COMPOSER_FLAGS="" - SYMFONY_VERSION="" @@ -28,7 +28,9 @@ matrix: env: SYMFONY_VERSION="3.3.*" # most recent versions - php: 7.1 - env: SYMFONY_VERSION="3.4.*" CHECK_PHP_SYNTAX="yes" + env: + - SYMFONY_VERSION="3.4.*" + - CHECK_CODE_STYLE="yes" - php: 7.2 env: SYMFONY_VERSION="4.0.*" # bleeding edge (unreleased dev versions where failures are allowed) @@ -44,7 +46,7 @@ cache: before_install: - if [[ "$ENABLE_CODE_COVERAGE" != "yes" ]]; then phpenv config-rm xdebug.ini || true; fi; - if [[ "$SYMFONY_VERSION" != "" ]]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi; - - if [[ "$CHECK_PHP_SYNTAX" != "yes" ]]; then composer remove "friendsofphp/php-cs-fixer" --no-update --no-interaction --dev; fi; + - if [[ "$CHECK_CODE_STYLE" != "yes" ]]; then composer remove "friendsofphp/php-cs-fixer" --no-update --no-interaction --dev; fi; install: - composer update --prefer-dist --no-interaction --optimize-autoloader --prefer-stable --no-progress $COMPOSER_FLAGS @@ -52,7 +54,7 @@ install: script: - if [[ "$ENABLE_CODE_COVERAGE" == "yes" ]]; then vendor/bin/simple-phpunit --coverage-text --coverage-clover build/logs/clover.xml; else vendor/bin/simple-phpunit; fi; - - if [[ "$CHECK_PHP_SYNTAX" == "yes" ]]; then vendor/bin/php-cs-fixer fix --config=.php_cs --dry-run --no-interaction --diff --path-mode=intersection; fi; + - if [[ "$CHECK_CODE_STYLE" == "yes" ]]; then PHP_CS_FIXER_FUTURE_MODE=1 vendor/bin/php-cs-fixer fix --config=.php_cs --dry-run --no-interaction --diff; fi; after_success: - if [[ "$ENABLE_CODE_COVERAGE" == "yes" ]]; then php vendor/bin/coveralls -v; fi;