Reputation: 4094
I followed all the steps from Laravel Installation guide.
Using Composer, the project is installed successfully on server and run like a charm.
On the installation, Composer add some dependencies in the vendor directory.
My question is: Why is there are so many dependencies for the "Hello World project". I don't understand the needs of directories. Heres the list:
I come from Zend development. So in the vendor directory, I was expecting only the framework Laravel, nothing else. Why would I need over 4200 files of 3rd party script.
Thanks for answering.
Carl
Upvotes: 6
Views: 2309
Reputation: 634
Laravel has many features out-of-the-box which are missing in other frameworks. I can understand that you think there are too many dependencies for something simple like a Hello World project, because you're completely right. But Laravel is not about adding features when you need them, it's about having all features already there. It's like comparing Arch Linux and Ubuntu. In Arch, you install things on the go when you need them. Ubuntu has everything out-of-the-box.
Which one is better is mostly a matter of taste.
I ran composer show --tree
in a new Laravel project to see a dependency tree. Now, as of Laravel 5.4.18, there are 4 main dependencies which pull in all other dependencies.
Many of these dependencies aren't in use when deployed, e.g. phpunit is only used for unit tests or the Symfony debug bar is used – well, you guessed it – for debugging.
Regarding your comment about removing dependencies: They are pulled in by one of the 4 main dependencies, so you have to either fork them and remove the unused components or live with it.
Upvotes: 3