chore(deps): pin rtcamp/wp-framework to ^1.0 - #747
Merged
Conversation
The theme tracked `dev-main`, so every build silently picked up whatever the framework's main branch happened to be at install time — unreproducible, and with no protection against a breaking change landing upstream. wp-framework now has a tagged v1.0.0 release, so pin to the constraint and let composer resolve it. The lock moves from dev-main@e30352c to v1.0.0 and the dev stability flag for the package drops out. minimum-stability stays `dev` — other dependencies may still rely on it, and narrowing it is a separate change.
pratik-londhe4
approved these changes
Jul 29, 2026
v1.0.0's Singleton storage change fataled this theme on boot (Access to undeclared static property Main::$instance — inc/Main.php:47 assigns it as the constructor's re-entrancy guard). v1.0.1 restores the protected $instance contract and documents that guard as the supported pattern, so no theme change is needed.
The Lint PHP job installs composer only, never npm, so node_modules does not exist there. PHPStan treats a missing excludePath as a configuration error and refuses to run: Invalid entry in excludePaths: Path ".../node_modules" is neither a directory, nor a file path, nor a fnmatch pattern. Appending `(?)` marks it optional, which is what PHPStan's own message recommends. Verified both ways locally: analysis passes with node_modules absent (CI) and present (dev), 16 files at level 8, no errors. Pre-existing on feature branches and on theme-elementary-v2 itself, not caused by the dependency pin in this PR — it surfaces here because the PHPStan job is new. Merging this carries the fix to the base branch too.
pratik-londhe4
approved these changes
Jul 29, 2026
aryanjasala
added a commit
that referenced
this pull request
Jul 29, 2026
Brings the branch up to date with the six commits merged since 2026-06-24 (#737, #746, #747, #748 and follow-ups) and fixes what that surfaced. Conflicts: .gitignore kept this branch's graphify-out rules; the base added nothing. README.md took the base's rewritten README and re-applied this branch's one addition, the "AI tooling" section. package.json union of both sides: the base's @rtcamp/eslint-config and @rtcamp/stylelint-config, plus this branch's script changes. Also: - @rtcamp/wp-tooling was pinned to "^0.1.0", a registry range for a package that is not published (npm 404s it), so `npm install` could not succeed. Point it at the branch split, as features-plugin-skeleton does. - Drop the GitHub Packages registry lines from .npmrc. All three @rtCamp dependencies now resolve from git branch refs, so no scope registry and no read:packages token is needed. The file's own TODO asked for this. - Regenerate package-lock.json. Git text-merged the two lock files, which left it internally inconsistent (@emnapi entries missing), and `npm ci --ignore-scripts` -- what the setup-node-with-cache action runs -- failed on it. Rebuilt from scratch; `npm ci` now succeeds. - phpcbf the PHP added on this branch: it predates the rtCampWP standard adopted in #748, which found 8 fixable violations across 5 files (import ordering, useless return annotations, class-brace and parent-call spacing). - Scope WordPressVIPMinimum.Performance.FetchingRemoteData off tests/*. The new LoggerTest reads a local fixture with file_get_contents; the caching advice is about remote URLs. Mirrors the exclusion #748 added for WordPressVIPMinimum.Functions.RestrictedFunctions. Verified: npm ci, npm run init -- --help, lint:js, lint:css, phpcs (0/0), phpstan (no errors), and a non-interactive scaffold via `node bin/init.js --name="Acme Portfolio" --yes`.
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.
What
Pins
rtcamp/wp-frameworkto^1.0instead ofdev-main, resolving to the tagged v1.0.1 release.Why
dev-mainis a moving target. Everycomposer installresolved to whatever the framework'smainbranch was at that moment — builds weren't reproducible, and nothing protected the theme from a breaking change landing upstream.That's not hypothetical: this PR originally locked to v1.0.0 and the whole PHP matrix fataled on boot —
v1.0.0 had changed the
Singletontrait's storage, removing theprotected static $instanceproperty this theme assigns in its constructor (inc/Main.php:47). That assignment is the re-entrancy guard for our constructor-driven Loader, so it wasn't safe to just delete. wp-framework v1.0.1 (rtCamp/wp-framework#82) restores the property and documents that exact pattern as the supported contract — so no theme code changes are needed here, only the pin and lock.The lock matters
composer.lockis committed and pinneddev-main@e30352c, so changingcomposer.jsonalone would breakcomposer installin CI. Regenerated:Only that package moves.
Deliberately unchanged
minimum-stability: devstays — other deps may rely on it; tightening it is a separate change.repositoriesVCS block stays — wp-framework isn't on Packagist, so composer still needs the source even though the repo is public now.Note on the code delta
dev-main@e30352cpredates the framework's audit fixes, so this pin also pulls in the crypto key derivation, asset path-traversal guards and feature-flag save fixes, and dropsXHProf_Profiler(removed upstream — this theme doesn't reference it, checked).Also in here: a PHPStan config fix
Lint PHPwas failing before this PR's own changes could be judged:That job installs composer only — never npm — so
node_modulesdoesn't exist and PHPStan treats the missingexcludePathas a config error and refuses to run. Appending(?)marks it optional, which is what PHPStan's own error message recommends.Unrelated to the dependency pin, and pre-existing on
theme-elementary-v2as well — it surfaces now because the PHPStan job itself is new. Bundled here rather than split out so this PR can actually go green; merging it fixes the base branch too.Verified locally both ways: 16 files at level 8,
[OK] No errorswithnode_modulesabsent (CI) and present (dev).