composer Flashcards

1
Q

What is the difference between require and require-dev

A

Require specifies the packages that are required for this application to run. Require-dev specifies packages that are required for development. For instance - ‘phpunit’ is not required for an app to run, so it should not be included in the “require” section.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

When you run composer install, which file does it read first?

A

composer.lock - if that doesn’t exist, then it will read composer.json

How well did you know this?
1
Not at all
2
3
4
5
Perfectly