psr-discovery/event-dispatcher-implementations
Discovers installed PSR-14 event dispatcher implementations (Symfony, League, Yiisoft, etc.) at runtime and returns the first available instance. Ideal for libraries/SDKs to support PSR-14 without hard dependencies or user configuration.
Architecture Fit
The package (psr-discovery/event-dispatcher-implementations) provides PSR-compliant event dispatcher implementations, aligning well with Laravel’s event system (which relies on PSR-14). The update to PHP 8.2+ is non-breaking for core functionality but enforces stricter compatibility with modern PHP features (e.g., named arguments, union types). This aligns with Laravel’s own PHP 8.2+ support (since v10.x), reducing version skew risks.
Integration Feasibility
Illuminate\Events\Dispatcher or third-party dispatchers (e.g., symfony/event-dispatcher) is seamless. No architectural changes are required.Technical Risk
Key Questions
array() syntax, foreach by reference) that could fail?Stack Fit
Migration Path
Illuminate\Contracts\Container\ContainerInterface).composer.json to require psr-discovery/event-dispatcher-implementations:^1.2.composer update and resolve dependencies.php artisan tinker for one-off events).Compatibility
EventServiceProvider or app/Events directory.laravel-notification-channels or spatie/laravel-event-scheduler if they interact with event dispatchers.Sequencing
Maintenance
@deprecated attributes).Support
event()) or DI container, not the underlying package.Scaling
Failure Modes
| Scenario | Impact | Mitigation |
|---|---|---|
| PHP 8.2 upgrade fails | Deployment blocker | Test PHP 8.2 in CI early; rollback to v1.1.1. |
| Custom event handler breaks | Event dispatch failures | Isolate custom events; use feature flags. |
| Dependency conflict with Laravel | Composer install fails | Explicitly require psr-discovery/event-dispatcher-implementations in composer.json. |
| No operational impact | N/A | Monitor logs for PHP deprecations. |
Ramp-Up
UPGRADE.md note for PHP 8.2 migration steps.phpstan/extension-installer rule to catch PHP 8.2 incompatibilities early.How can I help you explore Laravel packages today?