slier slier - 1 year ago 84
PHP Question

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

I'm new to the

and I would like to know the difference between
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 Source

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.