PrestaShop / PrestaShop/docs

Module naming conventions should allow underscore

Open
#1,722 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
136
Forks
555
Avg merge
4d 14h
Merged PRs (30d)
4

Description

In devdocs Module naming convention it is stated that:

  • Module names should contain only lower case and numbers.
  • Native modules' names must be prefixed with “ps_” (e.g. ps_linklist).

I suggest that the convention instead should be something like:

  • Module names should contain only lower case letter, numbers and underscore.
  • Developers are encouraged to prefix their modules with their own unique prefix, just like prestashop native modules are prefixed with ps_. This makes it easier to avoid conflicts in module name collisions , allowing the merchant to both have (example) modules psdevone_imageslider as well as psdevtwo_imageslider and ps_imageslider.
  • Native modules' names must be prefixed with “ps_” (e.g. ps_linklist).

Why allow underscores?

  • Because not allowing them means developers needs to change the name for hundreds of modules. Myself I have over 100 modules prefixed with "ko_" and most of them also has more underscores like "ko_product_homepage_slider"
  • Because snake-case-names looks better and are much_easier_to_read than notusingunderscoresatall, in file-lists, databases and where ever.

Also discussed on slack

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the devdocs Module naming convention page and compare it with the linked Native modules guidance. Update the convention to cover lowercase letters, numbers, underscores, and developer-specific prefixes while retaining the ps_ requirement for native modules; done means the documentation clearly reflects these rules.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.