axelerant / drupal-quality-checker

Pre-commit code quality checker for Drupal based projects.
https://packagist.org/packages/axelerant/drupal-quality-checker
12 stars 9 forks source link

Not working with Drupal 10 #19

Closed vishalkhode1 closed 1 year ago

vishalkhode1 commented 1 year ago

Problem Statement:

I'm not able to use it on Drupal 10 project. The problem is coming because of friendsoftwig/twigcs https://github.com/axelerant/drupal-quality-checker/blob/v1.2.0/composer.json#L16

Possible Solution:

Update the dependencies from: "friendsoftwig/twigcs": "^3.2 || ^4.0 || ^5.0", to "friendsoftwig/twigcs": "^3.2 || ^4.0 || ^5.0 || ^ 6.0",

hussainweb commented 1 year ago

Thanks for the analysis. Is it possible for you to raise a PR? We can drop ^3.2 from the version constraint.

I think GrumPHP shouldn't have a problem with TwigCS 6.0 (even though the TwigCs.php was last modified before 6.0 was released). From the release notes, the only relevant BC break is that a few options are now mandatory but GrumPHP is passing them in any case. So, we should be good.

vishalkhode1 commented 1 year ago

Hi @hussainweb Thanks for update. I've created PR #20 for the same. Also, verified and can confirm it's working as expected. Please see below.

Screenshot 2022-12-13 at 3 36 44 PM

Please review, merge PR & it would be helpful if you can make a new release. Thanks.

hussainweb commented 1 year ago

That PR is merged. Thanks for confirming this now works with Drupal 10. I'm checking a few more things and making a release.