Aerendir
Aerendir

Reputation: 6399

Composer: how to know a package by what other package is required

I've found nesbo/carbon in my vendor folder. It is a really useful library and I'm curious to know which other package I installed requires it.

How can I know this?

Upvotes: 33

Views: 7487

Answers (1)

Bukharov Sergey
Bukharov Sergey

Reputation: 10215

Lets look at composer why or composer depends command. This command shows which other packages depend on a certain package. Show usage

This is usage example

 $ composer depends psr/log
 symfony/debug  v3.2.2  requires  psr/log (~1.0)  

Upvotes: 56

Related Questions