3

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?

Fabian Schmengler
66.2k25 gold badges191 silver badges422 bronze badges
asked Aug 10, 2015 at 12:48

1 Answer 1

1

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:

 "extra":{
 "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

answered Aug 10, 2015 at 13:37
2
  • @fschmegler: Is there a way to capitalize the first letter of the $vendor and $name variable? Commented Aug 12, 2015 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 Commented Aug 12, 2015 at 6:11

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.