1

This is a follow up on the Magento 2 Extension naming convention question here.

I've learned thus far that you need

  • a Vendor Name
  • an Extension (or Module) name
  • a combination of both like Vendor_ExtensionName (to be used in a ~/etc/module.xml file).

Now something like ExtensionName (Capitals of both terms making it more readable) does not play all too nice in a git repository (which many may be using for development) so my question is:

Is it ok to use hyphens to separate words in the Extension name like Vendor_My-Extension (which makes a vendor_my-extension git repository) or does that run contrary to best coding practices?

0

It's allowed by default, only "_" is not allowed inside extensions or modules name because Magento 1.9 replace "_" to "/" when build path to files while looking files.

Using hyphens bad practice in Magento development, you should use CamelCase instead. This is a code standard for that framework.

  • thnks @SergeYudin for clarifying – vrms Sep 11 '18 at 7:40

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.