vijaycs85 / drupal-quality-checker

52 stars 38 forks source link

v1.5.0 - Seemingly incompatible phpcpd version. #32

Open rooflack opened 3 years ago

rooflack commented 3 years ago

Hello!

I just did upgraded from v1.4.0 to 1.5.0 on a project, and found out there seems to be an incompatibility between two dependencies.

The current (v1.5.0) composer.json states:

"require": {
  ...
  "phpro/grumphp": "^0.18",
  ...
  "sebastian/phpcpd": ">=4.0"
}

The issue is: GrumPHP 0.18 uses the --names option for PHPCPD, but this option has been removed in PHPCPD v6 (see Changelog.

This results in the following message being output as soon as a phpcpd task is configured:

phpcpd 6.0.3 by Sebastian Bergmann.

Unknown option "--names"

I guess a simple change in the version requirement, using something like "sebastianbergmann/phpcpd": ">=4.0 <6.0" should fix it. But I'm not sure of why the requirement was relaxed in the first place, so there may be additional implications here.

Hope this helps :) And thanks a lot for maintaining this carefully-crafted toolkit! This has proven very useful. Best regards, GM

prudloff-insite commented 3 years ago

grumphp is compatible with phpcd 6 only starting from grumphp 0.21.0: https://github.com/phpro/grumphp/commit/d0d38c2962a7a6bf60a9959d7c4ab969a93c39f0