wearejust / grumphp-extra-tasks

A set of extra tasks for grumphp
MIT License
23 stars 6 forks source link

GrumPHP 0.18 support #16

Closed drupol closed 4 years ago

drupol commented 4 years ago

Hi,

When using this package with GrumPHP >= 0.18, I get this error:

PHP Fatal error:  Uncaught GrumPHP\Exception\TaskConfigResolverException: Your configuration contains an old task implementation for "php_cs_auto_fixer".
This task cannot be used in current setup.
Please upgrade your extension(s) or fall back to a previous version of GrumPHP.
More information about the new task system: 
https://github.com/phpro/grumphp/blob/master/doc/tasks.md#creating-a-custom-task

 in /home/devlin/dev/git/b4/cas-lib/vendor/phpro/grumphp/src/Exception/TaskConfigResolverException.php:29
Stack trace:
#0 /home/devlin/dev/git/b4/cas-lib/vendor/phpro/grumphp/src/Configuration/Compiler/TaskCompilerPass.php(99): GrumPHP\Exception\TaskConfigResolverException::deprectatedTask('php_cs_auto_fix...')
#1 /home/devlin/dev/git/b4/cas-lib/vendor/symfony/options-resolver/OptionsResolver.php(1032): GrumPHP\Configuration\Compiler\TaskCompilerPass::GrumPHP\Configuration\Compiler\{closure}(Object(Symfony\Component\OptionsResolver\OptionsResolver), 'php_cs_auto_fix...')
#2 /home/devlin/dev/git/b4/cas-lib/vendor/symfony/options-re in /home/devlin/dev/git/b4/cas-lib/vendor/phpro/grumphp/src/Exception/TaskConfigResolverException.php on line 29
GrumPHP can not sniff your commits! (invalid-exit-code)

Are there any plan to support GrumPHP 0.18 ?

Mte90 commented 4 years ago

I confirm this issue :-(

Mte90 commented 4 years ago

Looking at the doc https://github.com/phpro/grumphp/blob/master/doc/tasks.md#creating-a-custom-task maybe changing on https://github.com/wearejust/grumphp-extra-tasks/blob/master/src/Task/PhpCsAutoFixer.php#L14 the class with TaskInterface maybe will fix it.

Mte90 commented 4 years ago

Nope I was wrong, the tasks now have a different syntax but there are different other projects that implement new grump tasks in different ways.

gravataLonga commented 4 years ago

Any news on this? Or this is dead?

drupol commented 4 years ago

I have a local similar package for phpcsfixer and phpcs, i need to work on them...

gravataLonga commented 4 years ago

@drupol thank you!! You are amazing!

drupol commented 4 years ago

Grumphp 0.19.1 has now some features to fix issues. I then choose to not continue the development of this and not use it in the next version of drupol/php-conventions.