문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top