Require vs require-dev - what's the difference and why should I care?


Composer is awesome and has made dependency management simple, allowing us software devs to better leverage the work of the amazing PHP Community.

There are a few parts of Composer that you may never have used, may never have needed, or may simply have no idea existed.

Whenever you add a package to your composer.json file, do you ever stop to think whether that package would actually be needed on a Production server? If the answer to that question is no, then maybe it could live in your require-dev section instead.

In this video you will learn when to use require, when it might be better to use require-dev, and what the differences between the two actually are.

Code For This Course

Get the code for this course.

Code For This Video

Get the code for this video.

Episodes

# Title Duration
1 Require vs require-dev - what's the difference and why should I care? 07:55