Add the running of Plugin Check back to our helper files#1028
Merged
Add the running of Plugin Check back to our helper files#1028
Conversation
jeffpaul
approved these changes
Jan 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the Change
Coming out of #1023, we removed the scanning of our helper files from Plugin Check as it wanted us to add a code snippet to prevent direct file access but this caused issues with PHPCS. After doing some more digging, found that when PHPCS is run, it will load your composer autoload file and this in turn will load any files you are directly loading via composer (as opposed to loading via psr-4). We do this for our helper files and so when you add an
exitstatement to these files, this stops PHPCS from running.There are a few fixes for this but seemed the easiest was to change from using
exitto usingreturnso that's what I've done in this PR. In addition, noticed a few PHPCS warnings around the use of heredoc instead of nowdoc so fixed those up as well.How to test the Change
Nothing really needed other than ensuring Plugin Check passes and PHPCS also passes
Note
E2E tests aren't working on WP trunk, assuming due to upstream issues
Changelog Entry
Credits
Props @dkotter
Checklist: