Skip to content

Conversation

@pwtyler
Copy link
Member

@pwtyler pwtyler commented Nov 14, 2025

Summary

This PR fixes PHPCS code style violations and enables the PHP style linting workflow to run on all future PRs

  • Fixed PHPCS violations, including class name format and line length issues
  • Re-enabled the PHPCS GitHub Actions workflow that was previously disabled
  • Addressed all but one warning (file_get_contents for local file is acceptable)
  • Configured --runtime-set ignore_warnings_on_exit 1 to display warnings without failing tests (allowing i18n one-line strings to exceed 120 character limit without breaking line)
  • Excluded PSR1.Files.SideEffects rule (WordPress ABSPATH security checks conflict with PSR-1)

Test plan

  • Verify PHPCS workflow runs successfully on this PR
  • Confirm all line length violations are resolved
  • Check class naming convention fixes

@pwtyler pwtyler requested review from a team as code owners November 14, 2025 20:05
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'PHP Style Linting' step
Uses Step
uses 'shivammathur/setup-php' with ref 'v2', not a pinned commit hash
AnaisPantheor
AnaisPantheor previously approved these changes Nov 17, 2025
Copy link
Contributor

@jazzsequence jazzsequence left a comment

Choose a reason for hiding this comment

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

If we're tackling this, we should use Pantheon WP Coding Standards rather than default WPCS for consistency with our other plugins. Otherwise, we'll likely need to make more PHPCS adjustments in the future if/when we migrate to use our own standards.

@wiz-inc-b08cf2810f
Copy link

wiz-inc-b08cf2810f bot commented Jan 21, 2026

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations 1 Low
SAST Finding SAST Findings -
Software Management Finding Software Management Findings -
Total 1 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

Reverts the multi-line concatenated base64 string workaround and uses the proper phpcs ignore comment approach, consistent with Settings.php.
This allows i18n strings to exceed line length limits without failing CI,
since WordPress i18n requires single literal strings for translation extraction.
WordPress i18n requires single literal strings for translation extraction.
Show line length warnings clearly in CI output while still passing tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants