You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stacked on #98. Merge after #98: once #98 merges and its branch is deleted, GitHub retargets this PR to main.
Fixes and release prep for the 2.0.0 public release, from a go-live audit of the package.
Bug fixes
Encryptor accepted a forged 1-byte GCM tag. Payloads shorter than the IV plus a full 16-byte tag are now rejected, and the fail-closed path when OpenSSL is missing is covered by a test. (6a65d7a, 4b8360b)
Transients lost keys longer than 172 characters, the WordPress limit for transient names. Longer names are now hashed. (37aa593)
AbstractBlock raised a notice when the build directory is missing. It now falls back to registering by block name. (5f6a5a5)
sync-ai now discovers packages in site repos through the vendored framework, prunes only the legacy files it generated, and logs the real path. (2835139, d7f4172)
Release readiness
README install instructions are Packagist-first, with the VCS repository as a fallback (51d1112)
.gitattributes trims the dist archive, and composer.json has complete Packagist metadata (506e881)
New tests for Cache, Timer, the legacy-core registrar, and a malformed asset manifest on the pre-6.8 fallback (8e51c9a, 528367c)
CI tests WordPress 7.1, the current stable release (31dffd0)
CI runs on Node 24, the docs action is pinned to a SHA, and checkout no longer persists credentials (944580d). Dependabot auto-merge is rebuilt on the pull_request pattern (4928c3d), and actions/deploy-pages is bumped to v5.0.1 (0630c09)
Dev dependencies: PHPCS toolchain security advisories patched; PHPStan, the WordPress stubs, wp-phpunit and @wordpress/env 11.16.0 updated (8c63972, a5d8d63, 55ec9ad)
Testing
PHPUnit: 288 tests passing on PHP 8.2 / WP 6.5, 8.3 / 7.0, 8.2 / 7.1 and 8.4 / 7.1
Line coverage: 99.16% (941 of 949) on PHP 8.3 / WP 7.0, and 948 of 949 across two cells
OpenSSL verifies a truncated GCM tag at its truncated length. A forged
13-byte payload (12-byte IV, 1 tag byte, empty ciphertext) therefore
decrypted to an empty string for 1 in 256 tag values instead of failing,
and payloads shorter than the IV reached OpenSSL with a short IV.
decrypt() now returns false for any decoded payload shorter than
IV_LENGTH + TAG_LENGTH before calling OpenSSL. The new tests try all 256
one-byte tags, cover short payload lengths, and confirm an encrypted
empty string (the smallest valid 28-byte payload) still round-trips.
encrypt() and decrypt() return false with a _doing_it_wrong() notice when
the OpenSSL extension is absent, but extension_loaded() cannot be faked,
so those 12 lines were never executed by the suite. Route the check
through a protected is_openssl_available() seam and test both methods
through a subclass that reports OpenSSL as unavailable.
A DB-backed transient is stored as _transient_{name} and
_transient_timeout_{name}, and option_name is varchar(191), so WordPress
documents a 172-character limit on the name. A longer namespaced key was
truncated by the options table: the value was never found again on the
next request, or, just past the limit, its expiry was silently dropped.
resolve_key() now maps a namespaced name longer than MAX_NAME_LENGTH to
h:<md5 of that name>. Names within the limit are unchanged, and a hashed
name can never equal an unhashed one, which always starts with digits.
Tests flush the object cache between write and read to force the
database path, which is what used to lose the value.
- Cache: a context-less instance passes groups through verbatim,
flush_group() clears only its namespaced group, remember_swr() serves a
fresh hit without calling back, and the cold-start lock wait both picks
up a value the lock holder publishes and, when the lock never frees,
falls back to the callback without releasing the other process's lock.
- Timer: lap() with an empty label warns and records nothing.
- AbstractAbilityRegistrar: on cores without the Abilities API (the 6.5
to 6.8 matrix cells) calling the callbacks directly is a silent no-op
that touches no seam, while the hooks are still added.
Level 6 reported a single error: the shortcode callback's $atts had no
iterable value type. Document it as array<string, mixed>|string (WordPress
passes an empty string when the tag has no attributes) and raise the
configured level; the codebase is clean at 6.
- Node 20 reached end of life in April 2026; the wp-env jobs now use the
current LTS (the suite was verified on Node 24).
- rtCamp/action-docusaurus-build was referenced by a mutable branch whose
code only exists on an unmerged PR; pin it to commit b671d68 until that
action is released and tagged.
- No job pushes, so checkouts no longer persist the token
(zizmor: artipacked), and $GITHUB_OUTPUT is quoted (shellcheck SC2086).
- Drop the stale "temporary deployment test branch" comment.
The workflow_run job could never merge anything: every run failed with
"Auto merge is not allowed for this repository", it did not check the
triggering run's conclusion, and zizmor flags both the workflow_run
trigger and the spoofable github.actor check as high severity.
Follow GitHub's documented pattern instead: run on the Dependabot pull
request itself, gate on the pull request author, read the update type
from dependabot/fetch-metadata (pinned to the v3.1.0 commit) and enable
auto-merge for minor and patch updates without checking out any code.
Repository settings still need "Allow auto-merge" enabled, and the
Test and Measure jobs should be required checks so a red run blocks it.
- export-ignore docs/, AGENTS.md, CONTRIBUTING.md and composer.lock, so a
Composer dist install ships only inc/, ai/, bin/, composer.json, the
README and the license. ai/ and bin/sync-ai-instructions.js stay in on
purpose: consumers run them from vendor/ via npm run sync-ai.
- composer.json gains a descriptive summary, keywords, the rtCamp author
entry used by rtcamp/nginx-helper, and a support.docs link to the
documentation site's post-rename path.
The README, getting-started guide and troubleshooting table still said
the package is not on public Packagist. With rtcamp/wp-primitives
published there, composer require is the whole install; the VCS
repositories entry stays documented as the fallback for installing from
GitHub, and the troubleshooting row now points renamed-package errors at
the 1.0.x to 2.0.0 upgrade guide.
Land together with the Packagist submission.
Record what main already ships but the changelog missed (the Abilities
API abstracts from #76), the two fixes on this branch (Encryptor under
Security, Transients under Fixed), the dist, CI and analysis changes, and
replace the stale "not on public Packagist" note.
refreshPackage() deleted a package's framework-php.instructions.md
whenever the file existed, so a hand-written file that happened to share
the pre-2.0 name was lost on upgrade. It now requires the legacy
GENERATED marker, the same test the root prune step already applies.
The prune log line also printed the wp-content root followed by
.github/instructions/..., naming a file that was not the one deleted; it
now prints the deleted file's path relative to the root.
Smoke-tested on a two-package wp-content tree: the generated legacy copy
is pruned, a hand-written one is kept, and --check reports in sync.
#98 aliased dev-main to 2.0.x-dev. That alias stops matching as soon as
main carries 2.1 work: a consumer asking for ^2.1@dev could not resolve
the branch. 2.x-dev covers every 2.y line without a bump after each minor
release, and still satisfies ^2.0@dev before the v2.0.0 tag exists.
Only the lock's content-hash changes.
composer audit reported three advisories in the dev toolchain that CI
runs on every pull request, including ones from forks:
- squizlabs/php_codesniffer < 3.13.6 (CVE-2026-67434, OS command injection)
- phpcsstandards/phpcsutils < 1.2.3 (CVE-2026-65954, arbitrary code execution)
- wp-coding-standards/wpcs < 3.4.1 (CVE-2026-45293, arbitrary code execution)
Update them (with automattic/vipwpcs 3.1.0 and phpcsextra 1.5.1, which
the new WPCS floor pulls in). composer audit is clean and PHPCS still
reports no violations. Supersedes Dependabot #84, #88 and #99 and the
PHPCS part of #93.
The maintainer guide said the repository had no authoritative release
procedure. With Packagist reading versions from tags, write one down:
changelog PR, annotated tag on main, GitHub release from the changelog
section, and a Packagist check, plus the rule never to move a published
tag and to leave the v1.0.x tags alone for ^1.0 consumers.
There was no SECURITY.md here or in the org's .github repository, so a
reporter landing on the public repo had no private channel to use.
Private vulnerability reporting is already enabled on the repository;
point reporters at it, list which versions get fixes (2.x yes, the
pre-rename 1.0.x line no), and say what a useful report contains. Keep
the file out of the dist archive like the other repository docs.
npm audit reported 9 advisories (5 high) in the wp-env test harness,
including extract-zip under @wordpress/env itself. 11.16.0, the latest
release on the same major, clears 6 of them; the remaining 3 are
moderate (qs via express via @wp-playground/cli) and have no fix in the
current dependency range yet.
Verified on the dev VM: the full suite passes under 11.16.0 with
coverage on PHP 8.3 / WP 7.0 and on PHP 8.2 / WP 6.5.
discoverPackages() only listed packages that already had a
.github/instructions/ directory. A site repository that commits only the
root projection (its packages have no per-package
directory) therefore got "Nothing to do", and after the rename its root
framework-php.instructions.md was never replaced or pruned.
A package now also qualifies when it vendors rtcamp/wp-primitives;
refreshPackage() creates its directory on the first run, and the root
projection skips a package whose directory does not exist yet under
--check, where the refresh step has already reported the drift. The
"nothing to do" message now says to run composer install first.
docs/upgrading.md gains the two steps a site repository hits while upgrading:
repoint each consumer's own bin/sync-ai.js wrapper at
vendor/rtcamp/wp-primitives, and run composer install in every package
before npm run sync-ai.
Smoke-tested on a site-style tree (two packages with vendored framework,
no per-package directories, a legacy root projection and a hand-written
root structure file): --check reports drift, sync replaces and prunes
the legacy projection, keeps the hand-written file, and --check is then
clean.
On WordPress 6.5 to 6.7 register_block_manifest() reads the manifest
itself and must ignore one that does not evaluate to an array. That
guard was the last uncovered branch in AssetLoader; the test runs on the
legacy cells of the matrix and is skipped on 6.8+, where core reads the
manifest instead.
register_block() passed get_block_dir() to register_block_type()
whenever it was non-empty. Before npm run build (a fresh clone, CI's
test-php job, a deploy that lost its build) the directory has no
block.json, so WordPress treated the path as a block name and raised
"Block type names must contain a namespace prefix" on every request,
registering nothing. The plugin skeleton's PHPUnit bootstrap hit this on
WP 6.7 and 7.0.
Register from the directory only when it holds a block.json, otherwise
register by get_name() so the server-side render keeps working. The new
test fails on any unexpected _doing_it_wrong(), so it also guards
against the notice coming back.
phpstan/phpstan 2.2.16, szepeviktor/phpstan-wordpress 2.0.4 with
php-stubs/wordpress-stubs 7.1.0, and wp-phpunit/wp-phpunit 7.1.1: the
rest of Dependabot group #93 after the PHPCS security updates. PHPStan
stays clean at level 6 against the WordPress 7.1 stubs.
WordPress 7.1 is the current stable release (7.1.2), but the matrix
stopped at 7.0, so the core most sites run was never tested. Add it for
PHP 8.2 to 8.4.
The checkout pins were labelled v6 but the SHA is v7.0.1 (the docs
workflow already said so), and the deploy-pages pin is v4.0.5. The SHAs
do not change.
v5 moves the action to the Node 24 runtime; v4 runs on Node 20, which
GitHub is retiring for actions. Same change as Dependabot #97, applied
here because this branch already edits the workflow.
Drop the rename notes from the README, the security policy, the maintainers guide, troubleshooting and the upgrading guide. The CHANGELOG 2.0.0 entry already records the rename and its breaking changes.
The reason will be displayed to describe this comment to others. Learn more.
Please list the ComponentLoader::get_context() default change as a breaking change. It renames hooks and asset handles for subclasses that do not override it.
Suggested change
-**BREAKING: `AssetLoader::HANDLE_PREFIX` default changes from `wp-framework-` to
-**BREAKING: `ComponentLoader::get_context()` default changes from `wp-framework` to
`wp-primitives`.** Subclasses that do not override it see their hooks move from
`wp-framework/component_*` to `wp-primitives/component_*` (`before_render`,
`after_render`, `asset_handle`, `should_enqueue`), and their asset handles from
`wp-framework-component-*` to `wp-primitives-component-*`. Override
`get_context()` in your subclass to keep the old names.
-**BREAKING: `AssetLoader::HANDLE_PREFIX` default changes from `wp-framework-` to
Also, on line 63, which is outside this diff: "23 translated strings" should be "22 translated strings". The 23rd literal is the ComponentLoader context.
- Moves the unreleased notes under [2.0.0] - 2026-10-01 and adds the 2.0.0 compare link, as docs/maintainers.md describes.
- The rename is one breaking entry that lists what the new name changes: namespace, AssetLoader::HANDLE_PREFIX, ComponentLoader::get_context() (its hooks and component asset handles were not listed before), the text domain and the AI rules file.
- The text domain covers 22 translated strings; the 23rd wp-primitives literal is the ComponentLoader context.
Update consumer guidance for missing block.json fallback
inc/Contracts/Abstracts/AbstractBlock.php:70
This changes the behavior of AbstractBlock, which is part of the consumed inc/Contracts/ API, but the consumer rules are not updated. AGENTS.md:17 explicitly requires contract changes to update ai/primitives-php.instructions.md; add the new missing-block.json fallback there so synced consumer guidance stays aligned.
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
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.
Stacked on #98. Merge after #98: once #98 merges and its branch is deleted, GitHub retargets this PR to
main.Fixes and release prep for the 2.0.0 public release, from a go-live audit of the package.
Bug fixes
Release readiness
.gitattributestrims the dist archive, andcomposer.jsonhas complete Packagist metadata (506e881)dev-mainis aliased as2.x-dev(b3ef412)Quality and CI
pull_requestpattern (4928c3d), andactions/deploy-pagesis bumped to v5.0.1 (0630c09)@wordpress/env11.16.0 updated (8c63972, a5d8d63, 55ec9ad)Testing