Repository navigation
v1.9.0 — Nene2\Demo disposable-demo module
Highlights
Nene2\Demo— disposable-demo framework module (ADR 0017). Upstreams the invoice-proven "disposable org" demo (GET /demo/{template}→ provision a throwaway tenant → seed industry data → seat a session → 302) as a product-independent, opt-in module.- Product-specific concerns live behind five small interfaces:
DisposableOrgProvisionerInterface,DisposableOrgReaperInterface(child-table teardown stays a product concern by design),DemoSessionSeaterInterface,DemoDataSeederInterface(single injected connection contract),DemoTemplateKeyInterface. - Framework concretes:
StartDisposableDemoHandler(gate → throttle/capacity → slug conflict retry → provision → seed → seat, RFC 9457 errors),DisposableDemoSweeper(TTL + overflow → reaper, returnsSweepReport),CountingDemoCapacityGuard(creation-time capacity ceiling + per-IP throttle — the root fix for invoice #608; reusesRateLimitStorageInterface),DemoRouteRegistrar. - Typed configuration:
DEMO_MODE/DEMO_SLUG_PREFIX/DEMO_TTL_HOURS/DEMO_MAX_ORGS/DEMO_SLUG_ATTEMPTSare loaded byConfigLoaderontoAppConfig::$demo(DemoConfig), documented in.env.exampleanddocs/development/configuration.md.DEMO_MODEuses the strict opt-in parse (only1/true/yes) — a typo fails closed. - New how-to:
docs/howto/add-disposable-demo.md(with ja/de/fr/zh/pt-br translations).
- Product-specific concerns live behind five small interfaces:
Breaking changes
None. Everything is opt-in and dormant unless wired; the only public-API change is a defaulted trailing constructor parameter on AppConfig (backward compatible per ADR 0009).
Migration notes
None required. Products adopting the module should follow docs/howto/add-disposable-demo.md. Consumer migrations (invoice → clear → vault) are tracked separately.
Verification
- PHPUnit (incl. 30 new Demo/Config tests), PHPStan level 8, php-cs-fixer, OpenAPI/MCP validation, conformance linter, version consistency — all green in CI (#1523, #1524).
Related
- Issue #1522, PRs #1523 / #1524, ADR 0017 (+ ADR 0009 surface registration)
- Root-fixes the class of invoice #608 (no creation-time capacity guard) for every adopter