There is a deploy per copy strategy. This can only be configured in the root composer.json, it can't be configured on a per-package level. Here is how to use it:
{
"extra":{
"magento-root-dir": "htdocs/",
"magento-deploystrategy": "copy"
}
}
Caution: this feature is new, so doku may be wrong, not uptodate or we have a bug somewhere. please test and give feedback.
{
"extra":{
"magento-root-dir": "../htdocs/",
"magento-deploystrategy": "symlink",
"magento-deploystrategy-overwrite": {
"magento-hackathon/magento-composer-installer-test-sort1": "copy",
"magento-hackathon/magento-composer-installer-test-sort2": "copy"
}
}
}
In some cases you may want to deploy your magento modules in specific order. For example when you have conflicting files and you know which module should be the overwriting one. As this makes most sense when you use copy with allowed force overwrite, here an example.
{
"extra":{
"magento-root-dir": "../htdocs/",
"magento-deploystrategy": "copy",
"magento-force": true,
"magento-deploy-sort-priority": {
"magento-hackathon/magento-composer-installer-test-sort1": "200",
"magento-hackathon/magento-composer-installer-test-sort2": "400",
"magento-hackathon/magento-composer-installer-test-sort3": "200"
}
}
}
As we also have the earlier described magento-deploystrategy-overwrite
you can build some interesting stuff.
For note: no priority defined means 100, if its deploy strategy copy, we use 101 as default.
So copy gets per default deployed before the symlinked modules now.
In some cases, you may only want single files/directories not get deployed,
for this you can use magento-deploy-ignore
which works either global or on module level.
{
"extra":{
"magento-root-dir": "../htdocs/",
"magento-deploystrategy": "copy",
"magento-force": true,
"magento-deploy-ignore": {
"*": ["/index.php"],
"connect20/mage_core_modules": ["/shell/compiler.php"]
},
}
}
may not work for symlink, when file/directory is content of a symlinked directory
If you only want to place packages into the vendor directory with no linking/copying into Magento's folder structure use this deploy strategy.
{
"extra":{
"magento-deploystrategy": "none"
}
}
On occasions you want trigger the deploy of magento modules without the need of an update/install process.
For this case you can trigger the related event manually with an additional paramater.
composer.phar run-script post-install-cmd -vvv -- --redeploy
This does remove all deployed files and redeploys every module