-
-
Notifications
You must be signed in to change notification settings - Fork 37
Description
Problem/Motivation
The aim of this is to add proper support for PHP CodeSniffer standards in packages installed outside of the vendor directory. One such example is Drupal's Coder module which is most commonly installed into
web/sites/all/modules/contributed/coder
orweb/modules/contributed/coder
where theweb
directory is on the same level asvendor
. The issue is that for such packages composer'sgetInstallPath()
returns an install path relative to the project root directory, and such relative paths are not treated properly later in the body of this plugin'supdateInstalledPaths()
.
Expected behaviour
The coding standard's install path is handled properly by this plugin's
updateInstalledPaths()
so that the coding standard is properly detected.
Actual behaviour
The coding standard's install path is processed in such a way that the value added to PHPCS's
installed_paths
is a non-existent directory.
Steps to reproduce
Require both
dealerdirect/phpcodesniffer-composer-installer
anddrupal/coder
in composer.json, runcomposer install
.drupal/coder
will be installed into the configured Drupal modules directory and will not be properly detected by this plugin.
Proposed changes
The suggestion is to ensure all coding standard install paths are absolute before searching for available rule-sets in
updateInstalledPaths()
. See #64.