3

Every thing is in the title : Does composer dump-autoload -o really need to be run after setup:di:compile as the official document seem to pretend : http://devdocs.magento.com/guides/v2.2/config-guide/prod/prod_perf-optimize.html

But if composer install --optimize-autoloader has been run before, the autoload dump is already done, i don't see relationship with setup:di:compile ?

2

Yes, it should be run after setup:di:compile command, because it generates new classes and they will be not be optimized for autoloading

|improve this answer|||||
  • 3
    I know it generates new classes (in var/di var/generation for magento < 2.2 and generated/ for magento 2.2) , but theses directories are not specified in the autoload list of the composer.json file, then i don't see any impact of composer autoloading on theses classes ? – Sylvain PRAS Nov 20 '17 at 7:58
  • @SylvainPRAS I know this is 3 years later than your comment, but generated/code is included now (currently I'm looking at Magento 2.3.3). – Erfan Jan 28 at 0:57
  • you're right, it has been added in 2.2.6 :-) – Sylvain PRAS Jan 29 at 8:25

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.