Yes, if something goes wrong, you can always delete the vendor folder and do a
composer update
// or
composer install
Which re-creates the vendor folder.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I know it's recommended, but in the past (before composer), working with Zend Framework and the like, EVERYTHING was included (except certain temp or CMS files and folders), including any vendor folder.
This honestly this made versioning easy, in the sense that if we moved servers or had to reinstall on a prod/qa/dev computer, we didn't have to hunt down the correct versions, and allowed seeing easily what was actually changed there even when (gasp) customizing code in those folders (which I'm against anyways).
So, moving forward, on a team that's new to Laravel and composer, is composer really good enough when installing/uninstalling/updating/downgrading on prod/qa/dev environments, or is there too much risk in losing code or changes or time by ignoring all of this source code in the vendor folder and simply relying on composer to "make everything right" if something has to be reinstalled/reverted/updated?
EDIT: Here's an example of our current .gitignore file, tailored to Laravel Mac PHPStorm basically:
because if you test and then a new package update is released, when you run composer update on your production server it will grab the latest version. Your production machine is now ahead of your local environments.
Composer.lock contains references to the exact versions used in your last update so composer install will be using the same version of all dependencies.
Its also critical if ypu are running a server farm. You dont want package revisions between deploying nodes
At Laracon EU, Alex Bilbie recommended commiting vendor to git so that you can rebuild yoursite if Github is down.
Please or to participate in this conversation.