WordPress / WordPress/WordPress-Coding-Standards
Handbook: when using aliases for imports, these should follow the naming conventions
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 2.8k
- Forks
- 521
- Avg merge
- 5d 20h
- Merged PRs (30d)
- 1
Description
Is your feature request related to a problem?
A sniff should be added to address the following handbook rule:
Aliases can be used to prevent name collisions (two classes in different namespaces using the same class name).
When using aliases, make sure the aliases follow the WordPress naming convention and are unique.
Additional context (optional)
:Related issue in PHPCSExtra: https://github.com/PHPCSStandards/PHPCSExtra/issues/232
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the WordPress Coding Standards handbook section on import/use statements and review the related PHPCSExtra issue #232. Then inspect the repository's existing sniff and test conventions for import aliases. Done means a sniff enforces unique aliases that follow the WordPress naming convention, with coverage for the stated rule.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100