If you use the alternative composer installers by AOE, you can add a composer package of type magento-source
as dependency and specify where the code should be placed:
"extra":{
"installer-paths": {
"www/" : [ "type:magento-source" ],
".modman/{$vendor}_{$name}/" : [ "type:magento-module" ]
},
For the Magento core you will need a repository with a composer.json
as follows:
{
"name": "magento/ce",
"description": "Magento Repository",
"type": "magento-source",
"require": {}
}
We use separate branches for each 1.x.x
version and apply patches on each branch. To be compatible with composer's version constraints, tags are added like this: 1.9.1.0-patch6285
This strategy works well if you consequently use modman
to link any custom files into the Magento root directory and don't add files directly. Then you can decide if you want to add the whole www
directory with the symlinks to Git or exclude it.
In the example above, the AOE installers are configured to put Magento modules directly into the .modman
directory, so that you can create the symlinks with a single modman deploy-all
. You can make use of composer scripts to trigger it automatically after composer install
and composer update
:
"scripts":{
"post-install-cmd": [
"modman deploy-all --force"
],
"post-update-cmd": [
"modman deploy-all --force"
]
}