My Magento environment is structured as following:

  • composer.json which includes "aoepeople/composer-installers": "*" and a list of Magento modules that deploy the code into my .modman directory. From here, i deploy the files through modman deploy-all into the Magento root folder.

So these are my steps, when a new extension update is available:

  • composer update
  • Inspect changes of the module code in the .modman folder
  • git commit
  • modman deploy-all
  • git push: Starts remote Magento deployment

This works as expected.

When i use the package avstudnitz/scopehints or mb/translate in my composer.json, the folders .modman/scopehints and .modman/translate are created. However, i would prefer a foldername including the vendor name, like the name of the Magento module itself, such as .modman/AvS_ScopeHint and .modman/MB_Translate for clarity.

Is there a way to define the composer deploy foldername for each Magento package?


Yes and no. In the extras.installer-paths configuration, you can use the variables {$name} and {$vendor}. But there is no way to get the name of the Magento module itself because it is not part of the module's composer configuration.

I use configuration like this:

    "installer-paths": {
      "www/" : [ "type:magento-source" ],
      ".modman/{$vendor}_{$name}/" : [ "type:magento-module" ]

which results in paths such as .modman/avstudnitz_scopehint (coming from the composer package name avstudnitz/scopehint

  • @fschmegler: Is there a way to capitalize the first letter of the $vendor and $name variable? – jhoelzl Aug 12 '15 at 5:48
  • Not without modification of the composer installer (you could fork it and add ucfirst() at the right place). But it's still not guaranteed that the result is exactly the Magento module name, so it might be misleading – Fabian Schmengler Aug 12 '15 at 6:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.