szeidler / composer-patches-cli

Adds a CLI wrapper for cweagans/composer-patches
MIT License
28 stars 8 forks source link

The helper "dialog" is not defined. #25

Closed luksak closed 3 years ago

luksak commented 3 years ago

When running composer patch-add or composer patch-remove, i get the following error:

$ composer patch-remove drupal/core "Patch title" 

The helper "dialog" is not defined.                               

patch-remove <package> <description>

I am running on Fedora with Composer 2.0.12

esolitos commented 3 years ago

Hello @luksak, can you give us some info about the project where you are using this plugin? If there is a public repo or if you can provide us a composer.json would be greatly appreciated and it would help us figure out what is the source of your issue.

szeidler commented 3 years ago

I didn't digged deeper into it, but it seems that we're using the dialoghelper that was deprecated in Symfony 3 and got removed in Symfony 4. I guess you're using Symfony 4? https://symfony.com/doc/2.8/components/console/helpers/dialoghelper.html

I'm happy to review a Pull Request - otherwise I will have a look when I get some time. The changes should be straightforward.

luksak commented 3 years ago

Does this depend on the project I am running this on? I am running Drupal 8 and Drupal 9. Other than that I haven't install Symphony globally.

We should be using anyhow: and this is a minimal change:

https://symfony.com/doc/2.8/components/console/helpers/questionhelper.html

luksak commented 3 years ago

Ok, got it working!

szeidler commented 3 years ago

Thanks for the contribution. The PR worked like charm - I just merged it in and tagged a new release.