2

I've recently upgraded from 2.1.8 to 2.2.2 CE(Commerce). Seems that var/di and var/generation are nowhere to be found.

Also did the logic behind the code generation changed ? I've noticed some high dependencies on the order of the Child Classes constructor parameters in PHP Dockblock. Above order of parameters in dockblock (/.../) making the difference between a successful generation and a failed one.

  • Generation should now be in [ROOT]/generated – André Ferraz Mar 7 '18 at 16:23
7

In Magento 2.2 the directories have changed from:

var/generation
var/di

To

generated/code
generated/metadata

More info can be found on the dev docs here.

Info on how DI compile works can be seen here, there are differences between 2.1 and 2.2. You can switch between versions at the top of the page.

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.