php-git-hooks icon indicating copy to clipboard operation
php-git-hooks copied to clipboard

PHP CS Fixer levels should be in lowercase and php-cs-fixer errors are not detected

Open xocasdashdash opened this issue 8 years ago • 2 comments

In the following lines: https://github.com/bruli/php-git-hooks/blob/master/src/PhpGitHooks/Module/PhpCsFixer/Service/PhpCsFixerTool.php#L45-L59

The php-cs-fixer levels are defined in uppercase, but php-cs-fixer fails if it uses that configuration if you run this locally: 'bin/php-cs-fixer' '--dry-run' 'fix' 'src/Cueball/PixelBundle/Controller/alpha/PixelController.php' '--level=SYMFONY' The command fails, but the failure is not detected because on https://github.com/bruli/php-git-hooks/blob/master/src/PhpGitHooks/Module/PhpCsFixer/Infrastructure/Tool/PhpCsFixerToolProcessor.php#L79 you use the normal output and the php-cs-fixer process writes to the error output (if you change the method to use getErrorOutput you start seeing the errors)

xocasdashdash avatar Mar 30 '17 09:03 xocasdashdash

Will this ever be fixed? :)

itaelle avatar Aug 31 '17 15:08 itaelle

Sorry by the delay. I will fix it coming soon.

bruli avatar Sep 20 '17 09:09 bruli