Skip to content

ci: ls-theme - restore theme validation and PHP code quality #74

Description

@brandonmarshal

CI Summary

Two checks fail on pull requests and develop in lightspeedwp/ls-theme. theme-utils.mjs requires styles/light.json, which was intentionally deleted in e6941fe on 14 April 2026. PHP Code Quality runs the full WordPress standard across the repository without a project ruleset; the reported findings are in existing theme files. Security Scan and CodeRabbit pass.

Linked Stories/Tasks/PRs/Epic

Audited PRs: #51, #54–#58, #60, #61. The same failures were reported in their latest runs and on develop.

Milestones & Timeline

One PR into develop; update open branches after it merges. No milestone or deadline set.

Steps / Checklist

  • Task is clearly defined and actionable
  • Automation/scripts referenced if applicable
  • Documentation/changelog updated
  • PR uses correct branch prefix (ci/)
  • PR description updated with relevant details
  • Changelog entry prepared for PR (if applicable)
  • Labels/types match org standards
  • Remove styles/light.json from the required list in theme-utils.mjs; update its matching comment, AGENTS.md, and README.md. Do not restore the file.
  • Add phpcs.xml.dist using the WordPress standard and text domain ls-theme; exclude vendor/, node_modules/, tests/, playwright-report/, and test-results/, and scope exclusions for @package and PHP-tag placement to patterns/*.
  • Point Composer phpcs and phpcbf scripts at the ruleset; run phpcbf and hand-fix remaining findings, including comment punctuation and required package tags outside patterns.
  • Merge one passing PR into develop; merge or rebase develop into open branches, including feature/ls-4179-phase-colour-and-services-block.
  • Make Validate Theme and PHP Code Quality required checks on develop.

Acceptance Criteria

  • Solution implemented and documented
  • CI/CD passes and is stable
  • No regressions in build/deploy processes
  • Branch prefix is correct (ci/)
  • Branch deleted/merged
  • npm run theme:validate exits successfully, and the subsequent lint:json step runs.
  • composer run phpcs exits successfully after auto-fixes and manual corrections.
  • Both checks pass on the PR and develop.

Additional Context

theme-utils.mjs currently requires the absent file; AGENTS.md and README.md still reference it. Unreplaced {{...}} placeholders in .github/prompts/ warn but do not cause the validation failure. PHP syntax lint passes. The reported PHPCS findings affect 11 older files, including six pattern files without @package, functions.php, inc/gsap.php, and two patterns with tag-placement or alignment errors. PHPCS findings were supplied in the audit and could not be rerun in the inspection environment.


Definition of Ready (DoR)

  • Build/CI goal and scope defined
  • Checklist prepared
  • Estimate added

Definition of Done (DoD)

  • Issue is fixed and tested
  • All checklist and acceptance criteria completed
  • Documentation/changelog updated if needed
  • Approved by at least one maintainer
  • PR uses correct branch prefix (ci/)
  • Branch deleted after merge
  • Linked issue(s) updated with latest status and closed after merge
  • The related epic should not be closed, instead updated with a comment to reflect the closed issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions