Skip to content

Release v2.4.0 - Migrate to B8 framework - #521

Open
sultann wants to merge 21 commits into
masterfrom
release/2.4.0
Open

Release v2.4.0 - Migrate to B8 framework#521
sultann wants to merge 21 commits into
masterfrom
release/2.4.0

Conversation

@sultann

@sultann sultann commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrates the free plugin off pluginever/framework-plugin and framework-settings onto the B8 framework (byteever/plugin 1.0.0), mirroring the pro plugin's migration (pluginever/wc-serial-numbers-pro#248). The model layer (pluginever/framework-model, Key/Activation models) intentionally stays for a later release, along with the concern regroup and namespace rename which ship next as 2.5.0.

Changes

  • Main file follows the wc-starter-plugin flow: Plugin::create() with explicit config and activation hooks via on_activation(); the WooCommerce-missing notice registers through the B8 notices service.
  • Plugin extends B8\App; every hook class converted to a B8\Component (Compat and API gate via autoload(); Admin via is_admin). Checkout validation split out of Orders into a Cart component. All source consolidated under includes/ (src/ removed).
  • Settings rewritten on B8 SettingsUI with WooCommerce field delegation — raw option names preserved, and the legacy wc_serial_numbers_settings_tabs / wc_serial_numbers_get_settings_{tab} filters keep firing (the pro depends on them). Settings::instance() and save_defaults() kept for the shipped pro installer.
  • Installer follows the blueprint pattern, seeds the B8 db version from the legacy option (also fixing the PHP 8.1 version_compare(null) deprecation), and registers the settings component before seeding defaults on activation.
  • Custom notices machinery replaced by the B8 notices service (same dismissed-notices option and even the same dismiss AJAX action name). Plugin list action/meta links restored including Go Pro.
  • Deprecated functions consolidated into includes/deprecated.php, each tagged; the one live filter that lived there moved into Orders.
  • Assets: wp-scripts/webpack replaced with sass + esbuild; sources flattened; the old framework's card/form/layout SCSS vendored as local partials so existing pev-* admin markup keeps its styling; images moved to assets/images.
  • A deprecated get_version() shim stays on the Plugin class — the shipped pro 1.4.6 probes it with is_callable(), which the B8 container's __call would otherwise turn into a fatal.
  • Minimum WordPress version raised to 6.4; workflows bumped to checkout v6 with a new manual tests workflow.

Verification

  • New PHPUnit baseline suite written before the migration and green throughout: 24 tests, 91 assertions.
  • The pro plugin's suite (19 tests) passes against this branch, and its CI bootstrap remains compatible with the current wp.org release — all four free/pro version combinations verified.
  • composer phpcs clean, php -l clean, assets build, pot regenerated.

@sultann

sultann commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

Pre-release gates for 2.4.0

Everything below must pass before this ships. The branch itself is verified compatible with pro 1.4.6 at the class/method level (Key::query, Menus static tabs, Settings::instance()->save_defaults(), get_version shim, ListTable all present) — these gates prove it at the behavior level and protect the rollout.

Compatibility

  • Shipped-pro zip audit. Grep the pro zips customers actually run (1.4.6, 1.4.5, oldest version with meaningful installs) for references into free (WooCommerceSerialNumbers\ classes, methods called on them, wc_serial_numbers() accessors). Confirm each exists in this branch. The git-head surface is covered; old zips may touch more.
  • Extend ContractTest to method level. Assert is_callable for Key::query, Settings::instance + save_defaults, Plugin::get_version, and the Menus static tab callbacks. Class-existence checks alone let a method removal slip through on the @next branch (Key::query is gone there while both shipped pro versions call it) — pinning methods here makes every future branch inherit the guard.

Testing (on the built zip from release.sh, not the repo checkout)

  • Matrix smoke with pro 1.4.6: generators screen, keys/stock list tables, tools tabs (import/export/generators must not duplicate — pro removes free's static callbacks by name), settings save + defaults seeding, full order flow delivering keys. Repeat once with the oldest supported pro zip.
  • Upgrade path: site on 2.3.4 with real data (keys, activations, settings) → update to 2.4.0. Settings intact, DB version seeds from the old option so historical update routines do not re-run, async update completes. Repeat from 2.3.2.
  • Rollback drill: update to 2.4.0, then restore the 2.3.4 zip. Site stays functional with settings intact — proves nothing was migrated-and-deleted.
  • Artifact checks: plugin-check clean on the built zip; fresh activation on clean WP + WC at the minimum supported versions.

Rollout

  • Release early in the work week, never before a weekend.
  • Rollback plan written down before tagging: exact steps to re-point the wp.org stable tag to 2.3.4.
  • Watch support forum and fatal reports for 48-72h.
  • Pro 1.5.0 ships 3-7 days after, never the same day.
  • Changelog: internal architecture migration, no functional changes.

Note: the Key::query removal is a release blocker for #522 (@next), not for this PR — flagged there separately.

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.

2 participants