Maybe this is a very silly question. I can not understand why I must run the command setup:di:compile every time I make changes to custom modules, to see the results when I am in developer mode.

Can it be disabled?


You don't need to run it. You can simply delete the var/generation directory. You only really even need to do this when you create a new constructor or change or reorder the arguments being passed into one of your class constructors.

I actually opt to just delete the entire var directory.

| improve this answer | |

You should not run setup:di:compile in developer mode!

This command need only for production mode.

| improve this answer | |
  • But if don't run it I can't see some changes I make to my custom extension. For example, when I add a new class to my module, it is not recognized until I run setup:di:compile. What am I doing wrong? – gianis6 Oct 1 '16 at 17:47
  • 1
    try cleanup var/di and var/generate folder and try one more time – KAndy Oct 1 '16 at 19:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.