diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index e7449bc..2c23bd4 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: php: - - "7.3" + - "7.4" steps: - name: "Checkout" @@ -30,7 +30,7 @@ jobs: with: coverage: "none" php-version: "${{ matrix.php }}" - tools: cs2pr, composer:v1 + tools: cs2pr, composer:v2 ini-values: "date.timezone=Europe/Paris" env: COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.php_cs b/.php-cs-fixer.php similarity index 67% rename from .php_cs rename to .php-cs-fixer.php index 5dc5396..19cd18d 100644 --- a/.php_cs +++ b/.php-cs-fixer.php @@ -1,6 +1,11 @@ in(__DIR__) + ->exclude(['vendor', 'var', 'web']) +; + +return (new PhpCsFixer\Config()) ->setUsingCache(true) ->setRiskyAllowed(true) ->setRules([ @@ -9,7 +14,7 @@ return PhpCsFixer\Config::create() 'array_syntax' => ['syntax' => 'short'], 'combine_consecutive_unsets' => true, 'heredoc_to_nowdoc' => true, - 'no_extra_consecutive_blank_lines' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block'], + 'no_extra_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']], 'no_unreachable_default_argument_value' => true, 'no_useless_else' => true, 'no_useless_return' => true, @@ -22,9 +27,5 @@ return PhpCsFixer\Config::create() 'strict_param' => true, 'concat_space' => ['spacing' => 'one'], ]) - ->setFinder( - PhpCsFixer\Finder::create() - ->exclude(['vendor']) - ->in(__DIR__) - ) + ->setFinder($finder) ; diff --git a/.travis.yml b/.travis.yml index da28dd6..2ed6a99 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ before_install: install: - if [ "$CS_FIXER" != "run" ]; then composer remove friendsofphp/php-cs-fixer --dev --no-progress --no-update ; fi; - - composer update --prefer-dist --no-progress --no-suggest -o $ + - composer update --prefer-dist --no-progress -o - php vendor/bin/simple-phpunit install before_script: diff --git a/composer.json b/composer.json index c0a1574..d32d576 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "require-dev": { "friendsofphp/php-cs-fixer": "^2.14", "monolog/monolog": "^1.24|^2.1", - "symfony/phpunit-bridge": "^4.2.3" + "symfony/phpunit-bridge": "^4.4|^5.3" }, "suggest": { "ext-tidy": "Used to clean up given HTML and to avoid problems with bad HTML structure."