Question

I know why we use bin/magento setup:upgrade and bin/magento setup:static-content:deploy

It is recommended on many blogs and forums that we need to execute bin/magento setup:di:compile after upgrade command.

It will be great if anyone can tell why do we use this command, what is the purpose behind it?

bin/magento setup:di:compile

Was it helpful?

Solution

setup:di:compile => Generates DI (Dependency injection) configuration and all missing classes that can be auto-generated

Trick: You can type php bin/magento, you'll see all commands with their purpose.

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top