hoaproject / Devtools

The Hoa\Devtools library.
https://hoa-project.net/
6 stars 6 forks source link

issue on cs fixer #46

Closed Grummfy closed 7 years ago

Grummfy commented 7 years ago

when I install php-cs-fixer globaly, I go errors php-cs-fixer --version PHP CS Fixer 2.3.1 by Fabien Potencier and Dariusz Ruminski (d5257f7)

$ vendor/bin/hoa devtools:cs --dry-run --diff . PHP Fatal error: Cannot override final method PhpCsFixer\AbstractFixer::fix() in /home/jvb/workspace/_perso/hoa/File/vendor/hoa/devtools/Resource/PHPCSFixer/Fixer/Author.php on line 92 PHP Stack trace: PHP 1. {main}() /home/jvb/bin/bin/php-cs-fixer:0 PHP 2. Symfony\Component\Console\Application->run() /home/jvb/bin/bin/php-cs-fixer:47 PHP 3. Symfony\Component\Console\Application->doRun() phar:///home/jvb/bin/bin/php-cs-fixer/vendor/symfony/console/Application.php:121 PHP 4. Symfony\Component\Console\Application->doRunCommand() phar:///home/jvb/bin/bin/php-cs-fixer/vendor/symfony/console/Application.php:190 PHP 5. Symfony\Component\Console\Command\Command->run() phar:///home/jvb/bin/bin/php-cs-fixer/vendor/symfony/console/Application.php:826 PHP 6. PhpCsFixer\Console\Command\FixCommand->execute() phar:///home/jvb/bin/bin/php-cs-fixer/vendor/symfony/console/Command/Command.php:262 PHP 7. PhpCsFixer\Console\ConfigurationResolver->getReporter() phar:///home/jvb/bin/bin/php-cs-fixer/src/Console/Command/FixCommand.php:144 PHP 8. PhpCsFixer\Console\ConfigurationResolver->getFormat() phar:///home/jvb/bin/bin/php-cs-fixer/src/Console/ConfigurationResolver.php:405 PHP 9. PhpCsFixer\Console\ConfigurationResolver->getConfig() phar:///home/jvb/bin/bin/php-cs-fixer/src/Console/ConfigurationResolver.php:560 PHP 10. include() phar:///home/jvb/bin/bin/php-cs-fixer/src/Console/ConfigurationResolver.php:215

Hywan commented 7 years ago

@vonglasow do you have time to look at this issue? Maybe @Grummfy, you should try a PR? Do you time for that?

Grummfy commented 7 years ago

well I got time for simple stuff

vonglasow commented 7 years ago

Ok I can reproduce the error I will see how to fix it.

vonglasow commented 7 years ago

Ok, so error found, I have identify the problem. The only thing is the code to fix it produce a BC break regarding the version of php-cs-fixer used. We need to replace the method fix used, by an inheritance method abstract called applyfix. The only change is the method name which create the BC break.

Hywan commented 7 years ago

@vonglasow @Grummfy Time to fix that?

vonglasow commented 7 years ago

It's already fixed on my side I have the code here but the will produce a BC I will create a branch and make a PR for that. We will see after what can we do.

Hywan commented 7 years ago

1.17.08.08 has been released.

Grummfy commented 7 years ago

\o/