Skip to content

test: lint the PHPUnit tests against WordPress-Core - #817

Merged
josephfusco merged 4 commits into
WordPress:mainfrom
rejaulalomkhan:fix/809-lint-phpunit-tests
Oct 12, 2026
Merged

josephfusco merged 4 commits into
WordPress:mainfrom
rejaulalomkhan:fix/809-lint-phpunit-tests

Conversation

@rejaulalomkhan

Copy link
Copy Markdown
Contributor

The ruleset splits WordPress into its component standards so source code keeps docblock and extra checks while unit tests follow WordPress-Core without file-name sniffs, exactly as wordpress-develop does.

Fixes #809
Part of #550

Use of AI Tools

AI assistance: Yes
Tool(s): Google Gemini
Model(s): Gemini 3.8 Flash
Used for: Analyzing phpcs ruleset configuration and resolving parameter and ternary sniffs; reviewed and verified locally by me.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props rejaulalomkhan, iamchitti, huzaifaalmesbah, joefusco.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

🛝 WordPress Playgrounds

Built from 6b19d2f

Post locks RTC Synced patterns Settings
Single site Launch post locks, single site Launch RTC, single site Launch synced patterns, single site Launch settings, single site
Multisite Launch post locks, multisite Launch RTC, multisite Launch synced patterns, multisite Launch network settings, multisite

@github-actions github-actions Bot added the Needs Reply Someone outside the maintainers has waited over 48 hours for an answer label Oct 12, 2026
@josephfusco

Copy link
Copy Markdown
Collaborator

Thanks for picking this up! #809 settled the ruleset: keep <rule ref="WordPress"> for the whole repository, add tests/, and turn off the six rules Deepak listed there for tests/ only. Could you rework this PR to that?

@josephfusco josephfusco removed the Needs Reply Someone outside the maintainers has waited over 48 hours for an answer label Oct 12, 2026
github-actions Bot added a commit that referenced this pull request Oct 12, 2026
@josephfusco

Copy link
Copy Markdown
Collaborator

I pushed the rework so this can land: <rule ref="WordPress"> stays, and the tests skip the rules that don't fit them by naming each sniff, since <rule ref="Squiz.Commenting"> would switch on every sniff in that category for the source files too. Your fixes to the tests stay as they are.

github-actions Bot added a commit that referenced this pull request Oct 12, 2026
@josephfusco josephfusco added [Type] Enhancement A suggestion for improvement of an existing feature [Area] Infrastructure Issues for the repository infrastructure php Pull requests that update php code labels Oct 12, 2026

@josephfusco josephfusco left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, nice first contribution!

@josephfusco
josephfusco merged commit f2a7402 into WordPress:main Oct 12, 2026
29 checks passed
@github-actions github-actions Bot added this to the 0.18.0 milestone Oct 12, 2026
@josephfusco josephfusco mentioned this pull request Oct 12, 2026
24 of 36 tasks
@rejaulalomkhan
rejaulalomkhan deleted the fix/809-lint-phpunit-tests branch October 13, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Infrastructure Issues for the repository infrastructure php Pull requests that update php code [Type] Enhancement A suggestion for improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The PHPUnit tests are not linted

2 participants