Skip to content

Follow the framework's hook grammar and move to GPL-3.0-or-later - #23

Merged
ahegyes merged 5 commits into
trunkfrom
feat/hook-grammar-and-gpl3
Oct 30, 2026
Merged

ahegyes merged 5 commits into
trunkfrom
feat/hook-grammar-and-gpl3

Conversation

@ahegyes

@ahegyes ahegyes commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Summary. The template follows the framework's trunk, which names every hook {prefix}/area/name with a last level that says what kind of hook it is, and moves to GPL-3.0-or-later with it.

  • Framework hooks: the framework fires {prefix}/boot/succeeded and schedules its migrations on {option}/migration/run, while the template waited for dws_tpl_initialized and listed dws_tpl_revision_run. On the new trunk the safeguard recipe never relaxed, and uninstall and deactivation never reached the migration hook.
    • The footprint lists Plugin::PREFIX . '_revision/migration/run'.
    • The safeguard recipe and its test sample wait for dws_tpl/boot/succeeded.
    • docs/ARCHITECTURE.md names dws_tpl/boot/blocked, /succeeded and /failed.
  • The template's own hooks:
    • the safeguard recipe's filter is dws_tpl/data_export/should_restrict, a decision a listener overrides;
    • the recurring-jobs recipe schedules Plugin::PREFIX . '/records/prune', an imperative under the area it acts on;
    • FootprintTest accepts the prefix followed by a slash, the form every hook name takes, so a plugin that follows that recipe stays in its prefix family;
    • AGENTS.md Style states the grammar for the hooks a plugin adds.
  • License: the framework a template plugin bundles is GPL-3.0-or-later, as are WooCommerce and every v1 plugin a port succeeds. LICENSE holds the GNU text of version 3, and the entry file's headers, the Composer and npm manifests, the README and the wordpress.org recipe's readme.txt skeleton declare GPL-3.0-or-later.
  • Packages: the Composer lock moves the framework to that trunk, with WordPress core 7.1.4, PHPStan 2.3.4, php-code-coverage 14.5.0, roave/security-advisories and Symfony patch releases. The npm lock stays as it is, because npm's seven-day release-age cooldown resolved an older Babel helper than the lock holds.

Includes +1 −1 (1 file), tests +9 −8 (3 files), docs +17 −17 (2 files), AGENTS.md and README +2 −1, LICENSE, four manifests and headers +5 −5, and the Composer lock (+736 −448 in all).

Review points.

  • Names chosen here: dws_tpl/data_export/should_restrict and Plugin::PREFIX . '/records/prune' apply the grammar to the template's own recipes; the framework fixes the rest.
  • No alias: nothing is released, so the old names get no deprecated bridge and no changelog fragment ships.
  • Footprint family: FootprintTest accepts dws_tpl/ for every kind. The test guards ownership, and only this plugin owns that prefix; AGENTS.md convention 6 keeps stored data under dws_tpl_.

Testing.

  • composer quality-check passes: validate, changelog validation, PHPCS on both profiles, PHPStan, Unit 6 and Integration 81.
  • npm run lint:scripts, lint:styles, lint:types, check:engines and check:licenses pass, and npm run test:e2e passes 3.
  • Before the change: on the new framework trunk, FootprintTest's framework row, SafeguardRecipeTest's explicit-false row and UninstallTest's consenting row failed.
  • Review: Claude code review at high and Codex; the last round found nothing new.

Move the framework packages to the trunk that names every hook by the
slash grammar and carries GPL-3.0-or-later, and refresh the rest of the
Composer lock: WordPress core 7.1.4, PHPStan 2.3.4, php-code-coverage
14.5.0, roave/security-advisories and Symfony patch releases;
theseer/tokenizer drops out as no package requires it any more. The npm
lock stays as it is, because npm's seven-day release-age cooldown on
this host resolved an older Babel helper than the lock already holds.

The framework's boot hook is now {prefix}/boot/succeeded and its
migration hook {option}/migration/run, which the template still names
the old way until the following commits.

Assisted-by: Claude Code:claude-opus-5-5
The framework fires {prefix}/boot/succeeded and schedules its
migrations on {option}/migration/run, while the template's safeguard
recipe waits for dws_tpl_initialized and its footprint lists
dws_tpl_revision_run, so the safeguard never relaxes and uninstall
leaves the real migration hook scheduled. The tests now expect the new
names, and the recipe's own filter by the same grammar as
dws_tpl/data_export/should_restrict.

Against the current code, FootprintTest's framework row,
SafeguardRecipeTest's explicit-false row and UninstallTest's consenting
row fail.

Assisted-by: Claude Code:claude-opus-5-5
The footprint listed dws_tpl_revision_run, so uninstall and deactivation
never reached the migration hook the framework schedules as
dws_tpl_revision/migration/run, and the safeguard recipe waited for
dws_tpl_initialized, which the framework no longer fires.

- the footprint lists Plugin::PREFIX . '_revision/migration/run';
- the safeguard recipe and its test sample wait for
  dws_tpl/boot/succeeded and name their filter
  dws_tpl/data_export/should_restrict, a decision a listener overrides;
- the recurring-jobs recipe schedules Plugin::PREFIX . '/records/prune',
  an imperative under the area it acts on;
- ARCHITECTURE.md names dws_tpl/boot/blocked, /succeeded and /failed;
- FootprintTest accepts the prefix followed by a slash, the form every
  hook name takes, so a plugin that follows the recurring-jobs recipe
  stays in its prefix family.

Assisted-by: Claude Code:claude-opus-5-5
The framework a template plugin bundles is GPL-3.0-or-later, as is
WooCommerce and every v1 plugin a port succeeds, while the template
declared GPL-2.0-or-later, so a plugin started from it would ship under
GPLv3 while its header said otherwise.

LICENSE holds the GNU text of version 3, and the entry file's headers,
the Composer and npm manifests, the README and the wordpress.org
recipe's readme.txt skeleton declare GPL-3.0-or-later.

Assisted-by: Claude Code:claude-opus-5-5
A plugin built from the template reads its AGENTS.md, which said only
that public hooks carry a docblock, while the framework those plugins
bundle names its hooks by a grammar the template's recipes follow too.
The Style section states it: dws_tpl/area/name, with a last level that
names the hook's kind.

Assisted-by: Claude Code:claude-opus-5-5
@ahegyes ahegyes changed the title Feat/hook grammar and gpl3 Follow the framework's hook grammar and move to GPL-3.0-or-later Oct 30, 2026
@ahegyes
ahegyes merged commit d64bd7d into trunk Oct 30, 2026
27 checks passed
@ahegyes
ahegyes deleted the feat/hook-grammar-and-gpl3 branch October 30, 2026 10:49
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