2.1 KiB
2.1 KiB
Beacon Milestones
Phase 3: Planning
-
Project Infrastructure & Core Dispatcher
- Initialize
composer.jsonwithgetphred/beacon-contractsand PHP 8.2 requirements. - Configure PHPUnit and test structure.
- Implement
EventDispatcher(PSR-14 compliant). - Implement basic
ListenerProvider. - Implement
CanStopPropagationtrait for stoppable events. - Test Coverage: Unit tests for core dispatching and stoppable behavior.
- Initialize
-
Advanced Listener Resolution
- Implement Priority-based listener sorting.
- Implement Inheritance Resolution (Event class, Parents, Interfaces).
- Implement Performance Toggle for Interface scanning.
- Implement Wildcard pattern support (
*) and internal regex caching. - Test Coverage: Unit tests for sorting, wildcards, and inheritance edge cases.
-
Middleware Pipeline (The Onion)
- Implement
MiddlewarePipelinerunner. - Integrate Middleware with
EventDispatcher. - Implement basic Telemetry (timing/memory) within the pipeline.
- Test Coverage: Integration tests for middleware execution order and telemetry accuracy.
- Implement
-
Discovery & Registration
- Implement
#[AsEventListener]and#[AsSubscriber]attribute support. - Implement
ListenerDiscoveryservice for scanning directories. - Integrate PSR-16 cache for discovery results.
- Implement PSR-11 container integration for lazy loading.
- Test Coverage: Integration tests for scanning, attribute resolution, and cache persistence.
- Implement
-
Resiliency & Advanced State
- Implement
FAIL_FASTandCONTINUEresiliency modes. - Implement
DispatchFailedinternal event forCONTINUEmode. - Implement
EventEnvelopefor carrying immutable context. - Test Coverage: Unit tests for error handling and context mapping.
- Implement
-
Testing Helpers & Verification
- Implement
EventCollectorfor assertions. - Create
EventAssertionstrait for PHPUnit. - Final Verification: Run full suite; zero failures, zero deprecations.
- Implement