Skip to content

Added symfony/config as a dependency.#4

Merged
zinigor merged 1 commit into
masterfrom
add/symfony-config-dependency
Jan 26, 2026
Merged

Added symfony/config as a dependency.#4
zinigor merged 1 commit into
masterfrom
add/symfony-config-dependency

Conversation

@zinigor

@zinigor zinigor commented Jan 26, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@zinigor zinigor merged commit 33254d0 into master Jan 26, 2026
1 check passed
@zinigor zinigor deleted the add/symfony-config-dependency branch January 26, 2026 13:24
zinigor added a commit that referenced this pull request Jan 26, 2026
titus-toia added a commit that referenced this pull request May 26, 2026
#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>
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