Symfony\Component\Debug\Exception\FatalThrowableError : Too few arguments to function PhpCsFixer\Console\Command\FixCommandExitStatusCalculator::calculate(), 4 passed in /Users/user/project/vendor/stechstudio/laravel-php-cs-fixer/src/Console/FixCommand.php on line 138 and exactly 5 expected
at /Users/user/project/vendor/friendsofphp/php-cs-fixer/src/Console/Command/FixCommandExitStatusCalculator.php:38
34| * @param bool $hasLintErrorsAfterFixing
35| *
36| * @return int
37| */
> 38| public function calculate($isDryRun, $hasChangedFiles, $hasInvalidErrors, $hasExceptionErrors, $hasLintErrorsAfterFixing)
39| {
40| $exitStatus = 0;
41|
42| if ($isDryRun) {
Exception trace:
1 PhpCsFixer\Console\Command\FixCommandExitStatusCalculator::calculate()
/Users/user/project/vendor/stechstudio/laravel-php-cs-fixer/src/Console/FixCommand.php:138
2 STS\Fixer\Console\FixCommand::handle()
/Users/user/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:32
Possible solution
Seems like a $hasLintErrorsAfterFixing has to be passed to calculate() as well. This is new in Version 2.16.0, which (after SemVer) shouldn't be a breaking change. But it is 🤷♂.
PHP-CS-Fixer
composer.json
Error
Possible solution
Seems like a
$hasLintErrorsAfterFixing
has to be passed tocalculate()
as well. This is new in Version 2.16.0, which (after SemVer) shouldn't be a breaking change. But it is 🤷♂.vendor/stechstudio/laravel-php-cs-fixer/src/Console/FixCommand.php
Hope this helps @bubba-h57