Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Maintaining Consistent Environments

When to Commit Composer Vendor Files to a Version Control System

I understand that I should not include the composer vendor folder when committing a project to a version control system. I also understand that I should include the composer.lock file when committing to a VCS.

That said, I would like to know if I should commit the the composer.json file to VCS as well.

Hey Mister M. - Yes in my opinion you should commit both. The composer.json file determines your dependencies and version ranges. The composer.lock file determines that actual dependency and version installed.

Hope that helps.

Cheers,

Ben

1 Answer

Thanks again @benpayne0925!

I feel like we should be collaborating on a project with all of the assistance that you have given me!