-
Notifications
You must be signed in to change notification settings - Fork 13
Description
composer supports so-called "installers".
using these installers you can - among a few other things - can adjust the location where packages get installed.
see e.g. this library installer which adjusts the path for certain packages.
there are a bunch of 1st party composer installers.
e.g. the (private) package complex/rocket is installed under vendor/plugins/rocket (for legacy reasons).
it seems the composer-dependency-analyser is somehow confused by the different package locations as it reports things like
➜ php-frontend-cms git:(check) ✗ vendor/bin/composer-dependency-analyser
...
Found .. shadow dependencies!
(those are used, but not listed as dependency in composer.json)
• plugins/rocket
e.g. ActionMailer in lib/cms/copy/LogMailer.php:7 (+ 140 more)
...
Found 1 unused dependencies!
(those are listed in composer.json, but no usage was found in scanned paths)
• complex/rocket
(scanned 217 files in 0.079 s)
-> it mixes up the package name complex/rocket with the filesystem location vendor/plugins/rocket, even though its the same thing (because of the used installer)
the quint essenz is, that installers might influence the location of packages and it might be useful that composer-dependency-analyser uses the getInstallPath api of composer - likely the one from InstalledVersions::getInstallPath($package).