Closed felmab closed 4 years ago
I had to replace by
standard: web/modules/contrib/coder/coder_sniffer/Drupal/
not sure why.
Seems to me that you are missing those two package :
drupal/coder install is for the drupal standard for phpcs dealerdirect/phpcodesniffer-composer-installer is for helping phpcs detect the drupal standard from drupal/coder
Thanks @Judapriest, composer show
reports dealerdirect/phpcodesniffer-composer-installer v0.6.2 and drupal/coder 8.3.9 are installed. Of course, drupal/coder is installed in web/modules/contrib like all Drupal modules. The "Drupal" standard is installed, I believe it is not properly referenced. I guess somehow it has to be registered and don't know how to force registration.
Of course, drupal/coder is installed in web/modules/contrib like all Drupal modules.
On another install it is in vendor/drupal/coder, this might be part of the problem.
On the faulty installation:
name : drupal/coder
descrip. :
keywords :
versions : * 8.3.9
type : drupal-module
license : GNU General Public License v2.0 or later (GPL-2.0-or-later) (OSI approved) https://spdx.org/licenses/GPL-2.0-or-later.html#licenseText
homepage : https://www.drupal.org/project/coder
source : [git] https://git.drupalcode.org/project/coder.git 8.3.9
dist : [zip] https://ftp.drupal.org/files/projects/coder-8.3.9.zip 8.3.9
path : /path/to/installation/project/web/modules/contrib/coder
names : drupal/coder
support
source : https://git.drupalcode.org/project/coder
requires
drupal/core ~8.0
requires (dev)
drupal/rules *
"Type" could be wrong, hence the installation path.
On a previous installation:
name : drupal/coder
descrip. : Coder is a library to review Drupal code.
keywords : code review, phpcs, standards
versions : * 8.3.8
type : phpcodesniffer-standard
license : GNU General Public License v2.0 or later (GPL-2.0+) (OSI approved) https://spdx.org/licenses/GPL-2.0+.html#licenseText
homepage : https://www.drupal.org/project/coder
source : [git] https://git.drupalcode.org/project/coder.git e53e75b45842a5d2b454b08c318a17f57339e60e
dist : []
path : /path/to/installation/project/vendor/drupal/coder
names : drupal/coder
autoload
psr-4
Drupal\ => coder_sniffer/Drupal/
DrupalPractice\ => coder_sniffer/DrupalPractice/
requires
ext-mbstring *
php >=7.0.8
squizlabs/php_codesniffer ^3.5.4
symfony/yaml >=2.0.5
requires (dev)
phpstan/phpstan ^0.12.5
phpunit/phpunit ^6.0 || ^7.0
"Type" could be wrong, hence the installation path.
Upstream looks good, though.
This appears to be a Composer issue.
Possible workarounds for the time being:
I installed Drupal Code Quality Checker with Composer:
composer require --dev vijaycs85/drupal-quality-checker:1.2.1
(I cannot install the latest version due to conflicts with dependencies already installed).When I commit, I get the following message :
How can I force to register the Drupal coding standard?
Here is my grumphp.yml file: