Commit d873b94
v0.1.4: merge release/0.1.0 + CLI wiring snippet + outbox payload docs (#5)
* Add a PHPUnit workflow. (#1)
* Updated composer lock file.
* Added a PHPUnit workflow file.
* Removed a non-existing switch and replaced it with testdox.
* Moved composer dependencies into require instead of suggest. (#2)
* Composer update.
* Version bump to 0.1.1.
* Moved to league/tactician 2.0-rc2 that is required by the codebase. (#3)
* Version bump.
* Added symfony/config as a dependency. (#4)
* Version bump.
* Add unit test suite (111 tests) and fix ProcessSteps JSON round-trip bug
Tests cover all major framework infrastructure:
- EventsUnitOfWork, EventRouter, DomainEventsPublishMiddleware
- OutboxProcessor retry/DLQ, OutboxIntegrationEventBus
- ProcessRunner, ProcessSteps (LongProcess lifecycle)
- TransactionMiddleware
- CorrelationContext, CorrelationMiddleware
- BehaviourWorkflow state machine (saga, forking, completion)
- WorkflowHandler batch processing + ledger
- Redactor sensitive-key masking, CommandAuditMiddleware
Bug fix: ProcessSteps::from_json_instance failed on round-trip because
JSON-decoded associative arrays (compensations, checkpoints) arrived as
stdClass instead of array. Added (array) casts. This would have broken
any LongProcess that suspends, reschedules, or is resumed from DB.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add unit tests for domain primitives and infrastructure (89 tests)
Covers DomainEvent/IntegrationEvent (name derivation, scalarise, payload),
LongProcess lifecycle (start, advance, suspend, compensate, hydrate),
ProcessSteps Result/AwaitEvent VOs, WorkItemList status filters and
aggregate_status priority, and TypedList (type enforcement, iteration,
filter, seek, clone, JSON serialization).
Total test count: 200 tests, 459 assertions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: eagerly boot event handlers so async callbacks register on every request
AsyncWordPressActionHandler registers add_action callbacks in __construct(),
but Symfony DI is lazy — services only construct when explicitly requested.
Action Scheduler jobs fail with "no callbacks are registered" because the
handler was never instantiated during the cron/AS request.
Add register_event_handlers() to hooks.php that finds all services in the
\Application\EventHandlers\ namespace (by convention from the scaffold) and
instantiates them on boot. No consumer-side configuration needed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(cli): print wiring snippet + bake version constant into DI
Two improvements to `wp ddd init` so newly scaffolded plugins can wire
themselves into WordPress without tribal knowledge:
1. Post-scaffold output now emits a paste-ready code block for the main
plugin file. Covers `register_activation_hook` → `install_tables` and
`add_action('init', ..., 2)` → `register_hooks`. Previously these
steps were undocumented; consumers had to copy from an existing
plugin or grep the framework source.
2. The generated `ddd-wordpress/di/index.php` now sets a Symfony
parameter `<prefix>.version` sourced from the plugin's VERSION
constant (e.g. `TANGIBLE_LMS_VERSION`), and the scaffolded
`services.yaml` references it via `%<prefix>.version%`. Previously
the YAML hardcoded `$version: 'dev'`, so every consumer's
`IDDDConfig::version()` returned the literal string `'dev'` instead
of the real plugin version.
New optional flag: `--version-const=<NAME>`. Defaults to
`{PREFIX_UPPER}_VERSION` (e.g. prefix `tgbl_cred` → `TGBL_CRED_VERSION`).
No changes to existing scaffolded plugins — they'll need a one-time
follow-up to apply the parameter-wiring pattern to their existing
services.yaml + DI/index.php.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: release 0.1.4 + outbox payload strategies doc
Bumps version after merging release/0.1.0 (unit tests, ProcessSteps JSON
fix, eager handler boot) and titus-cli-wiring-snippet (CLI wiring snippet
+ baked version constant).
Adds docs/outbox-transport-payload-strategies.md describing the inline
vs thin-args trade-off for the outbox-to-AS publisher path. Documents
why broker-based transports (RabbitMQ, SQS, etc.) require the inline
strategy: the worker process can't read the source DB. Captures the
implementation outline if we ever want to add the thin-args opt-in for
AS-only deployments.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Igor Zinovyev <zinigor@gmail.com>
Co-authored-by: Titus TC <titus@teamtangible.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 33254d0 commit d873b94
45 files changed
Lines changed: 3637 additions & 52 deletions
File tree
- ddd-src/Application/Process
- ddd-wordpress
- cli
- docs
- tests
- Fakes
- Unit
- Correlation
- Events
- Infra
- Logging
- Outbox
- Persistence
- Process
- Workflow
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | | - | |
64 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
0 commit comments