Sobes.tech
Junior

What is the difference between 'require' and 'require-dev' in the composer.json file?

sobes.tech AI

Answer from AI

The require section contains dependencies necessary for the application to run in both production and development.

The require-dev section contains dependencies needed only for development and testing, but not for running the application in production.

When executing composer install, dependencies from both sections are installed. When executing composer install --no-dev (for production), only dependencies from require are installed.

What is the difference between 'require' and… - sobes.tech