bruli/php-git-hooks

Not working with php-cs-fixser (1.10.2)

Closed this issue · 1 comments

Hello,

The PhpCsFixerHandler is not working with at least php-cs-fixser 1.10.2.
As php-cs-fixer cannot be called with --fixers=LEVEL_NAME. It should be replaced by --level=LEVEL_NAME.

But in this case, it is unnecessary to loop on all levels, as for exemple, level symfony includes levels psr0, psr1, psr2 already.
I suggest replacing in the config:

    php-cs-fixer:
        enabled:  true
        levels:
            psr0:       true
            psr1:       true
            psr2:       true
            symfony:    true

by

    php-cs-fixer:
        enabled:  true
        level: symfony # can be psr0, psr1, psr2, symfony
        fixers: # empty by defaut, override fixers configuration

Thanks for this nice tool !

bruli commented

Thanks.

I push into master branch change --fixers by --level.

I will add fixers option in php-git-hooks.yml in new version.