43 lines
2.1 KiB
Markdown
43 lines
2.1 KiB
Markdown
# Beacon Milestones
|
|
|
|
## Phase 3: Planning
|
|
|
|
1. **Project Infrastructure & Core Dispatcher**
|
|
- [x] Initialize `composer.json` with `getphred/beacon-contracts` and PHP 8.2 requirements.
|
|
- [x] Configure PHPUnit and test structure.
|
|
- [x] Implement `EventDispatcher` (PSR-14 compliant).
|
|
- [x] Implement basic `ListenerProvider`.
|
|
- [x] Implement `CanStopPropagation` trait for stoppable events.
|
|
- [x] **Test Coverage**: Unit tests for core dispatching and stoppable behavior.
|
|
|
|
2. **Advanced Listener Resolution**
|
|
- [x] Implement Priority-based listener sorting.
|
|
- [x] Implement Inheritance Resolution (Event class, Parents, Interfaces).
|
|
- [x] Implement Performance Toggle for Interface scanning.
|
|
- [x] Implement Wildcard pattern support (`*`) and internal regex caching.
|
|
- [x] **Test Coverage**: Unit tests for sorting, wildcards, and inheritance edge cases.
|
|
|
|
3. **Middleware Pipeline (The Onion)**
|
|
- [x] Implement `MiddlewarePipeline` runner.
|
|
- [x] Integrate Middleware with `EventDispatcher`.
|
|
- [x] Implement basic Telemetry (timing/memory) within the pipeline.
|
|
- [x] **Test Coverage**: Integration tests for middleware execution order and telemetry accuracy.
|
|
|
|
4. **Discovery & Registration**
|
|
- [x] Implement `#[AsEventListener]` and `#[AsSubscriber]` attribute support.
|
|
- [x] Implement `ListenerDiscovery` service for scanning directories.
|
|
- [x] Integrate PSR-16 cache for discovery results.
|
|
- [x] Implement PSR-11 container integration for lazy loading.
|
|
- [x] **Test Coverage**: Integration tests for scanning, attribute resolution, and cache persistence.
|
|
|
|
5. **Resiliency & Advanced State**
|
|
- [x] Implement `FAIL_FAST` and `CONTINUE` resiliency modes.
|
|
- [x] Implement `DispatchFailed` internal event for `CONTINUE` mode.
|
|
- [x] Implement `EventEnvelope` for carrying immutable context.
|
|
- [x] **Test Coverage**: Unit tests for error handling and context mapping.
|
|
|
|
6. **Testing Helpers & Verification**
|
|
- [x] Implement `EventCollector` for assertions.
|
|
- [x] Create `EventAssertions` trait for PHPUnit.
|
|
- [x] **Final Verification**: Run full suite; zero failures, zero deprecations.
|