Skip to content

WP/CapitalPDangit: add tests for namespaced names#2673

Merged
dingo-d merged 1 commit into
WordPress:developfrom
rodrigoprimo:capital-p-dangit-namespaced-names-tests
Dec 17, 2025
Merged

WP/CapitalPDangit: add tests for namespaced names#2673
dingo-d merged 1 commit into
WordPress:developfrom
rodrigoprimo:capital-p-dangit-namespaced-names-tests

Conversation

@rodrigoprimo
Copy link
Copy Markdown
Contributor

Description

In preparation for PHPCS 4.0, which changes the tokenization of namespaced names, this PR adds tests with all forms of namespaced function calls (partially qualified, fully qualified, and namespace-relative using the namespace keyword) to the WordPress.WP.CapitalPDangit sniff. The tests focus on calls to the define() function and namespaced variants that share the same name.

Suggested changelog entry

N/A

Copy link
Copy Markdown
Member

@jrfnl jrfnl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR @rodrigoprimo ! LGTM.

N.B.: I've verified that the other place where namespaced names could be problematic for PHPCS 4.0 (namespace declarations) is already sufficiently covered by tests.

@jrfnl jrfnl added this to the 3.3.x milestone Dec 16, 2025
@dingo-d dingo-d merged commit f0dc6ab into WordPress:develop Dec 17, 2025
31 checks passed
@rodrigoprimo rodrigoprimo deleted the capital-p-dangit-namespaced-names-tests branch December 17, 2025 19:28
@jrfnl jrfnl modified the milestones: 3.3.x, 3.4.0 Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants