How to show what a package requires in Composer

My composer just told me that a specific foo / bar package was left.

However, it is not listed in mine composer.json, so another package has this as a dependency.

How can I get Composer to show me this?

For example, he can tell me that my root composer.jsonrequires a / b, which requires c / d, which in turn requires breaking foo / bar.

+6
source share
2 answers
composer show --tree

Lists your dependencies as a tree. If you pass the package name, it displays a dependency tree for that package.

See the documentation for more details: https://getcomposer.org/doc/03-cli.md#show

+1
source

, , . , , , . , composer.lock . require require-dev , .

, A B, C. , A , composer show --tree package/a

0

Source: https://habr.com/ru/post/1016626/


All Articles