Best Practice Magento 2 / Composer / Custom Module

by Sony   Last Updated May 15, 2019 15:09 PM

Can you tell me what are the best practice when you create a custom module for a project. I would say to put the custom module related to the project in app/code/MyNamespace/MyModule and all Generic Module should be in vendor. Or should I put all in vendor folder and call my modules with composer ?

Thanks



Answers 1


I would suggest using app/code approach if your main goal to create the module is for customization. Rather than storing it directly in the vendor folder.
Magento puts all core modules in the vendor folder allowing you to create your customization in app/code without the risk of being overwritten during Magento update/upgrade.

magefms
magefms
May 15, 2019 14:59 PM

Related Questions


Updated July 07, 2017 14:09 PM

Updated September 26, 2017 14:09 PM

Updated November 21, 2017 18:09 PM