While I'm familiar with the basics of composer.json
and specifying dependencies under the require
key I haven't quite understood the purpose of require-dev
— Composer's documentation states:
Lists packages required for developing this package, or running tests, etc. The dev requirements of the root package are installed by default. Both install or update support the --no-dev option that prevents dev dependencies from being installed.
In the abstract it makes sense, but I'm having a hard to imagining the situations when I'd need this functionality.
- What are the practical use cases of
require-dev
in a workflow? - Is there an exemplar package (or packages) which should reside in
require-dev
but not inrequire
?