Upgrade build tooling and add PHPCS integration - #55
Merged
Merged
Conversation
Bumps grunt and grunt-contrib-* packages so npm install no longer fails, 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 (added/copied/modified/renamed, not deleted), so new code is held to standard without blocking on the existing backlog or failing on PRs that delete PHP files. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Build for ⬇️ Download radiate.zip (692K) Installs directly via Plugins → Add New → Upload Plugin. A later push only rebuilds this if its commit message includes |
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>
…-and-phpcs # Conflicts: # .npmrc # package-lock.json # package.json
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 Radiate theme. This mirrors the same work already done on Accelerate/Accelerate Pro and Radiate Pro, applying the same fixes up front.
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→>=20.0.0/>=9.0.0>=20specifically becausegrunt-wp-i18n@1.0.4's lockednode-wp-i18n@1.2.8→glob@11.1.0requires Node 20 or ≥22Gruntfile.jscompresstask now excludespackage-lock.json,vendor/,composer.json,composer.lock,phpcs.xml.dist,dist/**Gruntfile.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/radiate.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/radiate.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/radiate.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/radiate.zipfrom step 3 above (or activate the theme directory directly) and activate Radiate on a WordPress install.Loco Translate(or similar) can still readlanguages/radiate.potwithout errors.Changelog entry
Fix - Updated build tooling;
npm installandgrunt makepotno longer fail on modern Node/PHP.🤖 Generated with Claude Code