patchlevel / event-sourcing-phpstan-extension
PHPStan that understands your aggregates and catches event sourcing mistakes before runtime
Package info
github.com/patchlevel/event-sourcing-phpstan-extension
Type:phpstan-extension
pkg:composer/patchlevel/event-sourcing-phpstan-extension
1.2.0
2026-04-19 18:59 UTC
Requires
- php: ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0
- phpstan/phpstan: ^2.1.20
Requires (Dev)
- patchlevel/coding-standard: ^1.3.0
- patchlevel/event-sourcing: ^3.4.0
- phpstan/phpstan-strict-rules: ^2.0.4
- roave/security-advisories: dev-master
This package is auto-updated.
Last update: 2026-06-18 15:08:33 UTC
README
event-sourcing-phpstan-extension
"PHPStan that understands your aggregates and catches event sourcing mistakes before runtime."
Features
- Property initialization for aggregate roots and child aggregates, so PHPStan does not report false uninitialized property errors.
- Recording in apply methods is reported as an error, because recording events while replaying them leads to duplicated events.
Installation
composer require --dev patchlevel/event-sourcing-phpstan-extension
Register the extension in your phpstan.neon:
includes: - vendor/patchlevel/event-sourcing-phpstan-extension/extension.neon
Documentation
Integration
Contributing
We are open to contributions as long as they are in line with our BC-Policy.
Also note that the composer.lock is always generated with the newest supported PHP version as this is the version our tools run in the CI.