My Composer has just told me that a certain package foo/bar is abandoned.
However, it's not listed in my composer.json
, so therefore some other package has that as a dependency.
How can I get Composer to show me this?
For example, it might tell me that my root composer.json
requires a/b, which requires c/d which in turn requires the offending foo/bar.
You can run composer show -i (short for --installed ). In the latest version just use composer show .
Composer will look in all your repositories to find the packages your project requires. By default, only the Packagist.org repository is registered in Composer. You can add more repositories to your project by declaring them in composer.
The require_dev lists packages required for developing this package, or running tests, etc. The dev requirements of the root package are installed by default. Both install or update support the “–no-dev” option that prevents dev dependencies from being installed.
composer show --tree
Lists your dependencies as a tree. If you pass a package name it will show the dependency tree for that package.
See documentation for more: https://getcomposer.org/doc/03-cli.md#show
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With