WordPress / WordPress/WordPress-Coding-Standards

Handbook: check namespace names against naming conventions

Open
#2,304 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: Core Focus: Modern PHP Type: Enhancement Upstream: PHPCSExtra
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:

Each part of a namespace name should consist of capitalized words separated by underscores

Ref: https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#namespace-declarations

Additional context (optional)

Related issue in PHPCSExtra: https://github.com/PHPCSStandards/PHPCSExtra/issues/231

Contributor guide

Open the contributing guide

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

Begin with the namespace naming rule in the linked WordPress Coding Standards handbook and review the related PHPCSExtra issue 231. No implementation file or test is named; done means the project has a sniff that checks each namespace-name part against the stated capitalization and underscore convention.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.