From e9feca14a38e5c91bf29f0f3a7686384bf24804e Mon Sep 17 00:00:00 2001 From: pedro Date: Tue, 21 Jun 2016 00:11:53 +0200 Subject: [PATCH] Fix cs fixer dep --- .php_cs | 2 ++ .travis.yml | 18 ++++++++++++++++-- Makefile | 6 ++++++ composer.json | 8 +++++--- 4 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 Makefile diff --git a/.php_cs b/.php_cs index ebfff47..84e0105 100644 --- a/.php_cs +++ b/.php_cs @@ -9,6 +9,7 @@ return Symfony\CS\Config\Config::create() ->fixers(array( 'align_double_arrow', 'align_equals', + 'assign_and_return', 'concat_with_spaces', 'line_break_between_statements', 'logical_not_operators_with_spaces', @@ -22,5 +23,6 @@ return Symfony\CS\Config\Config::create() ->addCustomFixer(new PedroTroller\CS\Fixer\Contrib\LineBreakBetweenStatementsFixer()) ->addCustomFixer(new PedroTroller\CS\Fixer\Contrib\PhpspecFixer()) ->addCustomFixer(new PedroTroller\CS\Fixer\Contrib\SingleCommentExpandedFixer()) + ->addCustomFixer(new PedroTroller\CS\Fixer\Contrib\AssignAndReturnFixer()) ->finder($finder) ; diff --git a/.travis.yml b/.travis.yml index feed344..6fe0ea2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,21 @@ cache: directories: - $HOME/.composer/cache +matrix: + include: + - php: 5.3 + env: 'COMPOSER_FLAGS="--prefer-lowest --prefer-stable"' + - php: 5.4 + env: 'COMPOSER_FLAGS="--prefer-lowest --prefer-stable"' + - php: 5.5 + env: 'COMPOSER_FLAGS="--prefer-lowest --prefer-stable"' + - php: 5.6 + env: 'COMPOSER_FLAGS="--prefer-lowest --prefer-stable"' + - php: 7.0 + env: 'COMPOSER_FLAGS="--prefer-lowest --prefer-stable"' + - php: hhvm + env: 'COMPOSER_FLAGS="--prefer-lowest --prefer-stable"' + branches: only: - master @@ -20,5 +35,4 @@ before_script: - composer install script: - - bin/phpspec run -fpretty - - bin/php-cs-fixer --diff --dry-run -v fix + - make test diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..51c313a --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +test: + bin/phpspec run -fpretty + bin/php-cs-fixer --diff --dry-run -v fix + +fix: + bin/php-cs-fixer --diff -v fix diff --git a/composer.json b/composer.json index 14ff787..7792b84 100644 --- a/composer.json +++ b/composer.json @@ -1,9 +1,10 @@ { "name": "pedrotroller/php-cs-custom-fixer", + "description": "PHP-CS-FIXER : my custom fixers", "license": "MIT", "require": { "php": ">5.3.6", - "fabpot/php-cs-fixer": "^1.11" + "friendsofphp/php-cs-fixer": "^1.11" }, "require-dev": { "phpspec/phpspec": "^2.4" @@ -12,11 +13,12 @@ "psr-0": { "PedroTroller\\CS": "src/" } }, "config": { - "bin-dir": "bin" + "bin-dir": "bin", + "sort-packages": true }, "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.4.x-dev" } } }