Skip to content

Re-audit follow-ups: PHP 8.2 floor, v3.0.0, gate Schema::maybe_upgrade() - #12

Merged
akshat009 merged 3 commits into
mainfrom
chore/audit-followups-and-8.2
Aug 29, 2026
Merged

Re-audit follow-ups: PHP 8.2 floor, v3.0.0, gate Schema::maybe_upgrade()#12
akshat009 merged 3 commits into
mainfrom
chore/audit-followups-and-8.2

Conversation

@akshat009

Copy link
Copy Markdown
Owner

Stacked on #11. Addresses the re-audit's ranked items.

# Item Done
1 Bump to 3.0.0 before publishing package.json 2.0.0 → 3.0.0 (the PHP pin and the bootloader rewrite are both breaking; published was still 2.0.0)
2 Reconsider the 8.3 floor ✅ → 8.2. 8.1 is the newest syntax the templates use; 8.2 is the oldest PHP line still getting security fixes and the widest install base. MIN_PHP, CI matrix (['8.2','8.3','8.4']), phpcs testVersion 8.2-, the CLI's own PHP jobs, and the README all follow.
3 Gate Schema::maybe_upgrade() (#13) ✅ bails unless `is_admin()

Deliberately not done

Verified: 67 generator + 13 engine tests; 8.2 scaffold php -l clean.

…udit)

- MIN_PHP 8.3 -> 8.2: 8.1 is the newest syntax the templates use; 8.2 is
  the oldest line still getting security fixes and covers the widest install
  base. CI matrix + phpcs testVersion + own CI jobs + README follow.
- package.json 2.0.0 -> 3.0.0: the merged PHP pin and the static-bootloader
  rewrite are both breaking, and the published version was still 2.0.0.
- Schema::maybe_upgrade() (#13): bail unless is_admin() || wp_doing_cron() ||
  WP_CLI, so dbDelta() never runs on a cached front-end request. New
  Schema_Test case covers the front-end skip.

Verified: 67 generator + 13 engine tests; 8.2 scaffold php -l clean, version
tokens all 8.2.
@akshat009
akshat009 changed the base branch from feat/static-bootloader-services to main August 29, 2026 15:13
@akshat009 akshat009 closed this Aug 29, 2026
@akshat009 akshat009 reopened this Aug 29, 2026
@akshat009

Copy link
Copy Markdown
Owner Author

reopening to re-run CI

@akshat009 akshat009 closed this Aug 29, 2026
@akshat009 akshat009 reopened this Aug 29, 2026
@akshat009
akshat009 merged commit 0704a35 into main Aug 29, 2026
6 checks passed
akshat009 added a commit that referenced this pull request Aug 29, 2026
…repare-dist (#11, #12 revised)

Re-audit #2 retracted "drop the */templates/* exclude" — the WC email/My-Account
overrides genuinely fail three sniffs (PrefixAllGlobals on core WC hook names +
loosely-named locals; EscapeOutput on plain-text bodies that use
wp_strip_all_tags). But the blanket path exclude also silenced EscapeOutput on
the HTML email template, where escaping does matter.

Now: when a woo:email / woo:my-account module ships a templates/ dir,
phpcs.xml adds `<file>./templates</file>` and excludes only:
  - WordPress.NamingConventions.PrefixAllGlobals for */templates/*
  - WordPress.Security.EscapeOutput for */templates/emails/plain/* only
Everything else in templates/ (docblocks, spacing, i18n, the HTML email's
escaping) is linted. Gated on a new has_wc_template_overrides flag; a scaffold
without those modules has no templates/ reference at all.

Also: `composer prepare-dist` = `composer install --no-dev --optimize-autoloader`,
so `npm run plugin-zip` doesn't depend on the user reading the release docs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant