bruli/php-git-hooks

Fail with no error message

sergiolatostadora opened this issue · 4 comments

Hi,

Since last days sometimes when PHP-CS-FIXER fails wee only see Fail message like in photo attached.
No specific message

screenshot 2018-12-20 at 16 14 48

Someone with the same problem? version 5.8
configuration
php-cs-fixer:
enabled: true
levels:
psr0: false
psr1: true
psr2: true
symfony: true
options: null

bruli commented

Hi.
I will check it.
From last PR is not working fine.

Thanks bruli, it can be php cs fixer last version?

bruli commented

I'm not sure, I think no.

If I change PhpCsFixerToolProcessor

private function setError(Process $process)
{
if (false === $process->isSuccessful()) {
return $process->getErrorOutput();
}
}

to

private function setError(Process $process)
{
if (false === $process->isSuccessful()) {
return $process->getOutput();
}
}

I get a more verbose message with error file, not error message or line. I think this is because php-cs-fixer changed his output.

screenshot 2019-01-03 at 11 47 21