Skip to content

Support composer installersΒ #227

@staabm

Description

@staabm

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions