Know why certain composer packages are installed in your project
Ever wondered why certain packages are installed in your project when looking into your project’s “vendor” folder?
Well, the reason is that these packages are dependencies of the packages that you have installed in your project. But what if you want to know why a certain package is installed in your project?
You can use the
why
command of the composer to know why a certain package is installed in your project.
For instance, let’s say you want to know why the egulias/email-validator
package is installed in your project. You can do so by running the following command in your project.
$ composer why egulias/email-validator
This will give you the following output.
As you can see, the egulias/email-validator
package is installed in your project because the laravel/framework
and symfony/mailer
packages require it.
👋 Hi there! I'm Amit. I write articles about all things web development. If you like what I do and want me to continue doing the same, I'd like you consider leaving a tip. I'd highly appreciate that. Cheers!