slier slier - 2 months ago 22
PHP Question

What's the difference between require and require-dev?

I'm new to the

composer
and I would like to know the difference between
require
and
require-dev
.
The composer website doesn't offer a good explanation the difference between these two.

The part that I don't get is
Lists packages required for developing this package, or running tests, etc.
from Composer Official Docs.

Answer

The require-dev packages are packages that aren't necessary for your project to work and that shouldn't be included in the production version of your project.

Typically, these are packages such as phpunit/phpunit that you would use for unit testing your project.

Comments