S
S
solascriptura2017-04-25 21:00:07
Composer
solascriptura, 2017-04-25 21:00:07

What does require-dev do in Composer?

What is the difference between require and require-dev?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
harmoxyne, 2017-04-26
@solascriptura

Responsible for those dependencies that are needed only for the dev environment.
For example, you know for sure that the phpunit library is needed for development, but it will be superfluous on production, then phpunit gets into require-dev.
When a simple

composer install
dev dependencies are also installed.
When performed
composer install --no-dev
only those dependencies that are in the main require block are installed.
Source

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question