Feature matrix
Feature | Git | Composer |
---|---|---|
Main code repository | All code resides in one single, or a few Git repositories | All code resides in the packages in a Composer repository Each single Composer package is represented by a Git repository |
Code location | Development happens in the app/ directory | Development happens in the vendor/ directory |
Core upgrade management | Adobe Commerce core is installed and upgraded using Composer, the result is committed in Git | Adobe Commerce core is installed and upgraded using Composer; the result is committed in Git |
Third-party module management | Third-party modules are installed in vendor/ if they are installed through the marketplace or packagist.org. Otherwise they are installed in app/ | All third-party modules are installed in the vendor/ directory |
Releases | Releasing is characterized by git merge and git pull or git checkout commands | Releasing is characterized by composer update and git pull or git checkout commands |
Number of Git repositories | Few | Many |
Development complexity | Simple | Complex |
Pull request complexity | Simple | Complex |
Code review complexity | Simple | Simple |
Dev/QA/UAT environment update complexity | Simple | Complex |
GRA support |
|
|
Modules can automatically install external libraries |
|
|
Flexibility in GRA composition |
|
|
Module dependency management |
module.xml , limited functionality
|
composer.json
|
Module versioning |
|
|
Paid services needed | Git repository | Git repository, Private Packagist (± €600 per year) |
Bitbucket integration with Jira possible |
|
|
Changes to code instantly available for installation |
|
|
Solutions to avoid
-
Combining Composer and
app/code
for your modulesResult in having all the disadvantages of both code management styles combined in your project. It adds unnecessary complexity, instability, and lack of flexibility.
For example:
- Explain both Git and Composer workflows (instead of only one of them) to the development team.
- Install incompatible modules in
app/code
as there is nothing in place to stop that from happening. - Moving a module from
app/code
to Composer (or conversely) is cumbersome, especially with ongoing development.
-
Satis Package Manager
Private Packagist costs ± €600 per year. This cost is for the whole GRA combined, not per brand. Don’t try to avoid these costs by using the free solution Satis. Satis does not automatically update your packages whenever you push commits to git. Also Satis has no built in authorization. You must maintain a web server to run Satis. You end up spending a multitude of the Private Packagist subscription fee maintaining Satis.
-
Start with Git, then move to Composer
Make the choice for a code management approach at the start of your project. Switching from Git to Composer or conversely, with ongoing development is cumbersome and could lead to code loss and or revision history loss.