Skip to content

v1.9.0 — Nene2\Demo disposable-demo module

Choose a tag to compare

@hideyukiMORI hideyukiMORI released this 09 Jul 13:10
· 77 commits to main since this release
1770ce2

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, returns SweepReport), CountingDemoCapacityGuard (creation-time capacity ceiling + per-IP throttle — the root fix for invoice #608; reuses RateLimitStorageInterface), DemoRouteRegistrar.
    • Typed configuration: DEMO_MODE / DEMO_SLUG_PREFIX / DEMO_TTL_HOURS / DEMO_MAX_ORGS / DEMO_SLUG_ATTEMPTS are loaded by ConfigLoader onto AppConfig::$demo (DemoConfig), documented in .env.example and docs/development/configuration.md. DEMO_MODE uses the strict opt-in parse (only 1/true/yes) — a typo fails closed.
    • New how-to: docs/howto/add-disposable-demo.md (with ja/de/fr/zh/pt-br translations).

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

Full Changelog

v1.8.2...v1.9.0