Hi there,
I'm currently struggling in creating a good and stable development workflow based on composer. As installation via composer of Magento 2.3 is really easy, there are some questions about how to develop features and changing themes.
We have three different onlineshops (currently running on Magento 1.9, we are developing complete new from 2.3). These three shops share some modules, other modules are specific for certain shops.
Therefore we have to develop our own modules. This is the same for the frontend / theme. We have one theme common to all three shops and one specific theme for every shop, which inherits from the common theme.
What we want to achieve is a good and easy workflow for our developers. After searching and reading a lot of blog posts, stack overflow questions and so on, I am not sure how to reach this goal.
We use Git with GitLab for storing the source code, running builds, etc. This works fine for our 1.9 environment. With 2.3 we want to renew the whole process and starting at the development environment.
For this we created a new git repository "core", installed Magento 2.3 with composer and pushed the code (without vendor) into the repository.
Our modules live in other repositories and here is the first problem: how do you develop own modules which are installed with composer locally?
As far as I could find out, most people install the module via composer and work directly in the vendor directory. In my opinion, this is a really bad idea.
My current solution is to check the module into app/code via git submodule, develop and push it. Once the changes are final, a new tag can be created and the module can be installed via composer.
But this leeds to another problem: we have one repository for the shop, but have to maintain three different shops with different modules. How can I maintain the three different composer.json files?
One solution can be to create one repository for each shop, but that meens more effort in development.
I'm really confused about this and couldn't find a proper solution. Do you have any suggestions?
Thanks a lot
Martin