Skip to content

Update GitHub Actions, Node LTS and PHP pin - #5

Merged
eleshar merged 25 commits into
developfrom
chore/update-actions-node-php
Jul 29, 2026
Merged

Update GitHub Actions, Node LTS and PHP pin#5
eleshar merged 25 commits into
developfrom
chore/update-actions-node-php

Conversation

@eleshar

@eleshar eleshar commented Jul 29, 2026

Copy link
Copy Markdown
Contributor
  • actions/checkout: v4 -> v7

  • actions/setup-node: v4 -> v7

  • shivammathur/setup-php: v2 (unchanged, still current major)

  • Node LTS (.nvmrc): 20 -> 24

  • PHP pin (php-version): 8.2 -> 8.5

  • ci.yml and code-quality.yml: trigger on push/pull_request to develop as well as main

  • release.yml left unchanged (tag-driven, not affected)

  • package.json name: {{PACKAGE_NAME}} -> ls-starter-plugin (valid npm default, no longer a placeholder)

  • composer.json name: {{PACKAGE_NAME}} -> lightspeedwp/ls-starter-plugin; authors[0].homepage: {{AUTHOR_URI}} -> https://lightspeedwp.agency (was failing the composer.json schema)

  • package.json engines.node: >=20.0.0 -> >=24.0.0 (matches .nvmrc)

  • package-lock.json regenerated for the new package name and engines.node

  • code-quality.yml: removed the placeholder-detection skip step so Composer install/lint/phpcs run unconditionally again

  • README.md: customise-placeholders table no longer lists {{PACKAGE_NAME}} (it is not a placeholder in package.json/composer.json anymore); added a note that name fields ship with a valid default

  • Validate plugin (missing package-lock.json): root cause identified, not fixed here - see PR comment

  • {{PLUGIN_SLUG}}.php / uninstall.php: PHP identifiers (function names, defined() constants) were placeholder tokens ({{PLUGIN_SLUG}}init, {{NAMESPACE}}VERSION etc.) and did not parse as PHP; converted to a fixed scaffolding convention (ls_starter / LS_STARTER) that tooling replaces at generation time - placeholders in strings, docblocks and the plugin header comment are untouched

  • package.json: @wordpress/scripts ^30.0.0 -> ^33.0.0 for Node 24 compatibility; package-lock.json regenerated

  • package.json lint:js / lint:css: added --no-error-on-unmatched-pattern / --allow-empty-input so linting the still-empty src/ scaffold doesn't hard-fail under the newer ESLint/Stylelint bundled with wp-scripts 33

  • README.md: documented the ls_starter_ / LS_STARTER_ identifier convention in the customise-placeholders table; noted {{NAMESPACE}} now only appears in the @Package docblock tag

  • Added phpcs.xml.dist: WordPress standard, vendor/node_modules/build excluded, PHPCompatibilityWP with testVersion 8.0-, and a narrow per-file exclude of WordPress.Files.FileName for {{PLUGIN_SLUG}}.php only (scaffold placeholder filename, renamed at scaffold time so the sniff cant pass in template form)

  • composer.json phpcs/phpcbf scripts simplified back to plain "phpcs"/"phpcbf" now that phpcs.xml.dist carries the config (replaces the earlier --ignore=vendor/,node_modules/ workaround)

  • {{PLUGIN_SLUG}}.php: fixed tab indentation (WordPress standard requires tabs) on the ABSPATH guard and the load_plugin_textdomain() call, and re-indented its multi-line arguments; added a full stop to the inline comment in ls_starter_init()

  • uninstall.php: added full stops to the three inline example comments so they meet the WordPress inline-comment sniff

Closes #4

Summary by CodeRabbit

  • Chores
    • Updated the development, CI, and release environments to use newer Node.js and PHP versions.
    • Expanded automated checks to run on both main and develop.
    • Upgraded GitHub Actions tooling and adjusted linting to target the intended source files while ignoring vendor/ and node_modules/.
  • Documentation
    • Refreshed the placeholder customization guide and token list with clearer guidance.
  • Scaffolding / Templates
    • Updated the plugin bootstrap placeholders and renamed the text-domain loader and initializer used by the template.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Note

.coderabbit.yml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized keys: "version", "path_instructions"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

The PR updates the plugin bootstrap naming, package metadata, lint commands, documentation, Node.js and PHP versions, GitHub Actions versions, and workflow branch triggers.

Changes

Plugin template and validation updates

Layer / File(s) Summary
Bootstrap identifiers and package metadata
{{PLUGIN_SLUG}}.php, composer.json, package.json, README.md
Plugin constants and hook functions now use LS_STARTER identifiers; package defaults and placeholder documentation are updated.
Lint and code-quality command updates
composer.json, package.json
PHP lint commands exclude vendor/ and node_modules/; JavaScript and CSS lint commands, the Node requirement, and @wordpress/scripts version are updated.
CI triggers and runtime pins
.github/workflows/*, .nvmrc
CI and code-quality workflows include develop, actions use v7, Node.js is pinned to 24, and configured PHP runtimes use 8.5.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

  • lightspeedwp/ls-starter-theme issue 3 — Covers similar GitHub Actions, Node.js, and PHP version updates.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive Node 24 and the action tags align with current releases, but PHP fleet coverage, CI pass status, and warning-free logs can't be verified here. (nodejs.org) Provide workflow logs and fleet details proving PHP coverage, CI success, and no new deprecation warnings.
✅ Passed checks (4 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed The README, package, and template edits support the stated Node/PHP and scaffolding work; no unrelated changes stand out.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: GitHub Actions upgrades plus Node and PHP version bumps.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/update-actions-node-php

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@eleshar eleshar added area:ci Build and CI pipelines area:dependencies Composer/npm dependency work labels Jul 29, 2026
@mergify

mergify Bot commented Jul 29, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@eleshar

eleshar commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Validate plugin check fails on a missing package-lock.json. Root cause: repo .gitignore documents package-lock.json as committed (consistent with ls-starter-theme, which does commit one), but no lockfile was ever committed to this repo - it is not the workflow that is wrong. Generating a valid lockfile needs npm install against the real dependency tree, which is not possible via the GitHub API without a clone, so leaving this for a real npm install + commit rather than fabricating a lockfile.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@package.json`:
- Line 16: Update the package.json lint:json script to remove the unconditional
“|| true” fallback, ensuring failures from wp-scripts lint-md-docs propagate and
cause npm run lint to fail; only retain a guard if it distinguishes empty input
without suppressing real lint errors.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9bd18b7a-4eec-44c1-aa61-c383ee805381

📥 Commits

Reviewing files that changed from the base of the PR and between e322dc5 and 97d75a9.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (6)
  • .github/workflows/ci.yml
  • .github/workflows/code-quality.yml
  • README.md
  • composer.json
  • package.json
  • {{PLUGIN_SLUG}}.php
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/code-quality.yml
  • .github/workflows/ci.yml

Comment thread package.json
@eleshar
eleshar merged commit ac05cd6 into develop Jul 29, 2026
6 checks passed
@eleshar
eleshar deleted the chore/update-actions-node-php branch July 29, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci Build and CI pipelines area:dependencies Composer/npm dependency work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update GitHub Actions and move Node off EOL 20

1 participant