Skip to content

Repair wp/6.0 branch Actions: ignore empty PHP files in the PHP coding standards scan - #361

Closed
desrosj wants to merge 1 commit into
fix-actions-6.0/fix-activate-theme-navigation-racefrom
fix-actions-6.0/fix-phpcs-php-deprecation-crash
Closed

desrosj wants to merge 1 commit into
fix-actions-6.0/fix-activate-theme-navigation-racefrom
fix-actions-6.0/fix-phpcs-php-deprecation-crash

Conversation

@desrosj

@desrosj desrosj commented Sep 15, 2026 •

Copy link
Copy Markdown
Owner

What?

Keeps the Unit Tests → PHP coding standards job from failing on a deliberately empty placeholder file under packages/e2e-tests/themes.

Why?

packages/e2e-tests/themes/style-variations/index.php is an intentionally empty placeholder — the standard WordPress convention for blocking a directory listing. PHP_CodeSniffer's Internal.NoCodeFound check reports any file containing no PHP code as a warning, and phpcs exits non-zero as soon as any warning is reported. That single file is therefore enough to fail the scan even when there is not one real coding-standards issue anywhere else in the codebase.

How?

phpcs.xml.dist: ports trunk's existing Internal.NoCodeFound exclusion. Trunk excludes its own test-theme fixture directory (/test/gutenberg-test-themes/*); this branch's equivalent fixture directory is packages/e2e-tests/themes/*.

Verification

Ran the PHP coding standards job's exact command — phpcs --report-full --report-checkstyle=./.cache/phpcs-report.xml — at PHP 7.4 (the version that job pins), against this branch's tree with this branch's pinned Composer dependencies installed: exit code 0, 241 files scanned, no errors and no warnings.

Use of AI Tools

This PR was created by Claude Code under my supervision. All code should be treated as AI-produced and not yet reviewed by a human until this PR is marked Ready for Review.

@desrosj desrosj self-assigned this Sep 15, 2026
@desrosj
desrosj added this pull request to stack #329 September 15, 2026 04:41
@desrosj
desrosj removed this pull request from stack #329 September 21, 2026 18:46
@desrosj
desrosj changed the base branch from fix-actions-6.0/update-php-test-matrix to wp/6.0 September 21, 2026 18:47
@desrosj
desrosj force-pushed the fix-actions-6.0/fix-phpcs-php-deprecation-crash branch from ac25901 to 63530ce Compare September 21, 2026 18:52
@desrosj
desrosj changed the base branch from wp/6.0 to fix-actions-6.0/update-php-test-matrix September 21, 2026 18:54
@desrosj
desrosj added this pull request to stack #404 September 21, 2026 18:54
@desrosj
desrosj removed this pull request from stack #404 September 21, 2026 19:38
@desrosj
desrosj changed the base branch from fix-actions-6.0/update-php-test-matrix to wp/6.0 September 21, 2026 19:39
@desrosj
desrosj force-pushed the fix-actions-6.0/fix-phpcs-php-deprecation-crash branch from 63530ce to 8ebbcf0 Compare September 21, 2026 19:42
@desrosj
desrosj changed the base branch from wp/6.0 to fix-actions-6.0/update-php-test-matrix September 21, 2026 19:45
@desrosj
desrosj added this pull request to stack #418 September 21, 2026 19:45
@desrosj
desrosj removed this pull request from stack #418 September 21, 2026 21:52
@desrosj
desrosj changed the base branch from fix-actions-6.0/update-php-test-matrix to wp/6.0 September 21, 2026 21:53
@desrosj
desrosj force-pushed the fix-actions-6.0/fix-phpcs-php-deprecation-crash branch from 8ebbcf0 to c850647 Compare September 21, 2026 21:55
@desrosj
desrosj changed the base branch from wp/6.0 to fix-actions-6.0/update-php-test-matrix September 21, 2026 21:56
@desrosj
desrosj added this pull request to stack #429 September 21, 2026 21:57
@desrosj
desrosj removed this pull request from stack #429 September 21, 2026 23:49
@desrosj
desrosj changed the base branch from fix-actions-6.0/update-php-test-matrix to wp/6.0 September 21, 2026 23:50
@desrosj
desrosj changed the base branch from wp/6.0 to fix-actions-6.0/update-php-test-matrix September 21, 2026 23:52
@desrosj
desrosj added this pull request to stack #438 September 21, 2026 23:52
@desrosj
desrosj removed this pull request from stack #438 September 22, 2026 15:57
@desrosj
desrosj changed the base branch from fix-actions-6.0/update-php-test-matrix to wp/6.0 September 22, 2026 15:58
@desrosj
desrosj force-pushed the fix-actions-6.0/fix-phpcs-php-deprecation-crash branch from c850647 to 55e9cf9 Compare September 22, 2026 16:00
@desrosj
desrosj changed the base branch from wp/6.0 to fix-actions-6.0/fix-playwright-noble-install September 22, 2026 16:01
@desrosj
desrosj added this pull request to stack #462 September 22, 2026 16:02
@desrosj
desrosj removed this pull request from stack #462 September 22, 2026 20:44
@desrosj
desrosj changed the base branch from wp/6.0 to fix-actions-6.0/fix-playwright-noble-install September 23, 2026 21:29
@desrosj
desrosj added this pull request to stack #502 September 23, 2026 21:30
@desrosj
desrosj force-pushed the fix-actions-6.0/fix-phpcs-php-deprecation-crash branch from d0e6771 to 3ffa979 Compare September 24, 2026 00:38
@desrosj desrosj changed the title Repair wp/6.0 branch Actions: fix PHP lint step crashing under a current PHP release Repair wp/6.0 branch Actions: ignore empty PHP files in the PHP coding standards scan Sep 24, 2026
@desrosj
desrosj force-pushed the fix-actions-6.0/fix-phpcs-php-deprecation-crash branch from 3ffa979 to b0eabca Compare September 24, 2026 02:44
@desrosj desrosj closed this Sep 24, 2026
@desrosj
desrosj deleted the fix-actions-6.0/fix-phpcs-php-deprecation-crash branch September 24, 2026 04:42
@desrosj
desrosj restored the fix-actions-6.0/fix-phpcs-php-deprecation-crash branch September 24, 2026 04:42
@desrosj desrosj reopened this Sep 24, 2026
@desrosj
desrosj removed this pull request from stack #502 September 24, 2026 18:18
@desrosj
desrosj changed the base branch from fix-actions-6.0/fix-playwright-noble-install to wp/6.0 September 24, 2026 18:18
@desrosj
desrosj force-pushed the fix-actions-6.0/fix-phpcs-php-deprecation-crash branch from b0eabca to 1a7d78a Compare September 24, 2026 18:18
@desrosj
desrosj changed the base branch from wp/6.0 to fix-actions-6.0/fix-playwright-noble-install September 24, 2026 18:19
@desrosj
desrosj added this pull request to stack #522 September 24, 2026 18:19
@desrosj
desrosj removed this pull request from stack #522 September 28, 2026 14:36
@desrosj
desrosj changed the base branch from fix-actions-6.0/fix-playwright-noble-install to wp/6.0 September 28, 2026 14:36
@desrosj
desrosj force-pushed the fix-actions-6.0/fix-phpcs-php-deprecation-crash branch from 1a7d78a to 504cd4d Compare September 28, 2026 14:37
@desrosj
desrosj changed the base branch from wp/6.0 to fix-actions-6.0/fix-activate-theme-navigation-race September 28, 2026 14:38
@desrosj
desrosj added this pull request to stack #543 September 28, 2026 14:38
@desrosj
desrosj removed this pull request from stack #543 September 28, 2026 19:11
@desrosj
desrosj changed the base branch from fix-actions-6.0/fix-activate-theme-navigation-race to wp/6.0 September 28, 2026 19:11
@desrosj
desrosj force-pushed the fix-actions-6.0/fix-phpcs-php-deprecation-crash branch from 504cd4d to 35903c1 Compare September 28, 2026 19:12
@desrosj
desrosj changed the base branch from wp/6.0 to fix-actions-6.0/fix-activate-theme-navigation-race September 28, 2026 19:12
@desrosj
desrosj added this pull request to stack #569 September 28, 2026 19:12
@desrosj
desrosj removed this pull request from stack #569 October 5, 2026 18:42
@desrosj
desrosj added this pull request to stack #605 October 5, 2026 18:43
`packages/e2e-tests/themes/style-variations/index.php` is a
deliberately empty placeholder (the standard WordPress convention for
blocking a directory listing). PHP_CodeSniffer's `Internal.NoCodeFound`
check flags any file containing no PHP code as a warning, and
`phpcs` exits non-zero when any warning is reported, so this file
alone was enough to fail the lint step even with no real errors
anywhere else in the codebase.

Trunk already excludes this same sniff for its equivalent test-theme
fixture directory (`/test/gutenberg-test-themes/*`); this ports the
same exclusion, adapted to this branch's `packages/e2e-tests/themes`
path.
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

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.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: desrosj <desrosj@git.wordpress.org>

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

@desrosj

desrosj commented Oct 8, 2026

Copy link
Copy Markdown
Owner Author

Moved to WordPress#84278.

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.

1 participant