Conversation
Bumps grunt and grunt-contrib-* packages so npm install no longer fails with an ERESOLVE peer conflict, fixes compress excluding composer/vendor files from the release zip, and fixes makepot which was fatal-erroring on PHP 8 due to the removed create_function(). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds composer.json/phpcs.xml.dist with the WordPress + PHPCompatibility (7.4) ruleset, and a PR workflow that lints changed PHP files only, so new code is held to standard without blocking on the existing backlog. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Resolve the Node 18 dependency incompatibility, ensure npm installs devDependencies in production mode, and handle deleted PHP paths in CI.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
Upgrades build tooling and adds Composer/PHPCS validation and CI for the theme.
Changes:
- Updates Grunt dependencies, packaging, and POT generation.
- Adds Composer-based WordPress coding standards tooling.
- Adds changed-PHP-file PHPCS checks in GitHub Actions.
- Refreshes npm/Composer lockfiles and generated translations.
| File | Summary |
|---|---|
phpcs.xml.dist |
Defines coding standards configuration. |
package.json |
Updates build dependencies and Node requirements. |
package-lock.json |
Locks upgraded npm dependencies. |
languages/accelerate.pot |
Regenerated translation catalog. |
Gruntfile.js |
Fixes POT metadata and archive exclusions. |
composer.lock |
Locks Composer tooling dependencies. |
composer.json |
Adds PHPCS tooling and scripts. |
.npmrc |
Configures npm installation behavior. |
.gitignore |
Ignores Composer vendor files. |
.github/workflows/phpcs.yml |
Adds changed-file PHPCS CI. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
grunt-wp-i18n@1.0.4 pulls in node-wp-i18n@1.2.8, whose bundled glob dependency requires Node 20 or >=22. The previous >=18.0.0 requirement allowed a Node version the build doesn't actually support. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
all_changed_files includes deletions, so a PR removing a PHP file would pass a nonexistent path to PHPCS and fail the job. Same bug Copilot caught in accelerate-pro's identical workflow; fixing it here too since both were copied from the same template. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
Author
|
@tg-autopilot review |
style.css declares Requires PHP: 5.6, but testVersion was set to 7.4- -- silently raising the theme's real compatibility contract without that being a deliberate product decision. Set to 5.6- to match what's actually declared; bumping the real minimum is a separate call for the team to make, not something to smuggle into tooling setup. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.


Summary
Fixes the broken build toolchain and adds WordPress Coding Standards (PHPCS) tooling for the Accelerate theme.
Changes
package.jsongrunt0.4.5→^1.6.3package.jsongrunt-contrib-compress~1.2.0→^2.0.0,grunt-contrib-jshint~1.0.0→^3.2.0package.jsongrunt-wp-i18n~0.5.4→^1.0.4makepot.phpcalls the removed PHP 8 functioncreate_function(), fatal-erroringgrunt makepotpackage.jsonengines.node/engines.npm>=0.8.0/>=1.1.0→>=18.0.0/>=9.0.0Gruntfile.jscompresstask now excludespackage-lock.json,vendor/,composer.json,composer.lock,phpcs.xml.distGruntfile.jsmakepottask now setspotCommentsexplicitlygrunt-wp-i18n@1.0.4's default comment template leaks a literal<!=...=!>placeholder into the.potheader when not overridden — an upstream bug.npmrc(new)omit=optionalnpm installsilently skips alldevDependencies(where the whole Grunt toolchain lives) whenever the shell hasNODE_ENV=productionset —gruntnever gets installed.gitignore/vendor/composer.json,phpcs.xml.dist(new)PHPCompatibilityruleset,testVersion 7.4-,composer phpcs/composer phpcbfscripts.github/workflows/phpcs.yml(new)languages/accelerate.potnpm run buildon the fixed toolchainQA / Test steps
Toolchain (no WordPress needed):
git clonethis branch fresh,cdinto it.npm installwith no flags.node_modules/.bin/gruntexists.npm run build.makepotandcompressboth run and finish withDone., exit code0. Nocreate_function()PHP fatal error.languages/accelerate.potand check the first 2 lines.# Copyright (C) <year> ThemeGrill/# This file is distributed under the GNU General Public License, version 3 (GPLv3).— plain text, no<!=or=!>characters.unzip -l dist/accelerate.zip | tail -5.vendor/,composer.json,composer.lock, orphpcs.xml.distentries.composer install && composer phpcs.phpcs.xml.distruleset (will report the pre-existing backlog — that's expected and out of scope for this PR).Theme behavior in WordPress (manual — do this before merging):
dist/accelerate.zipfrom step 3 above (or activate the theme directory directly) and activate Accelerate on a WordPress install.Loco Translate(or similar) can still readlanguages/accelerate.potwithout errors.Changelog entry
Fix - Updated build tooling;
npm installandgrunt makepotno longer fail on modern Node/PHP.🤖 Generated with Claude Code