ramsey/conventional-commits

CaptainHook plugin is broken with symfony 6

diego-ninja opened this issue · 4 comments

The CaptainHook plugin don't work as expected when used with symfony 5 packages, the bug is related to the implementation
of InputInterface in Ramsay\CaptainHook\Input.php, as the class is not defining return types in some functions that the interface does.

I just opened a pull request with the fix.

Hi, thanks for submitting this!

Do you mean Symfony 5 or Symfony 6?

Here's what I see in Symfony 5: https://github.com/symfony/console/blob/6c6664efbf6fc5f22bc6cbcb03616dc7f1eb6e6f/Input/InputInterface.php#L29

And here's what I see in Symfony 6: https://github.com/symfony/console/blob/faf53e783e67847aff7de5ba73d9be76b7d4d65c/Input/InputInterface.php#L27

So, I think your changes are to support Symfony 6, right?

Unfortunately, this means that I'll have to drop Symfony 5 support, which might cause problems with others using this package. I'll need to give some thought to this.

Yeah, I mean Symfony 6, sorry for the typo. I will modify pull request.

@diego-ninja Hello,

I ran to the same problem today. I resolved the issue using patches in composer. Use this plugin https://github.com/cweagans/composer-patches and as a patch use your PR. I used it too and it works.

At least something before this issue gets resolved. :)

Thanks for reporting. This is fixed in version 1.3.1.