backslashphp / backslash
CQRS and Event Sourcing infrastructure for modern PHP
Requires (Dev)
- ext-pdo_sqlite: *
- friendsofphp/php-cs-fixer: ^3
- nunomaduro/collision: ^6
- phpstan/phpstan: ^1
- phpunit/phpunit: ^8 || ^9
- psr/container: ^2
- ramsey/uuid: ^4
- squizlabs/php_codesniffer: ^3
Suggests
- phpunit/phpunit: PHPUnit is required by Scenario component
README
Modern and opinionated PHP library designed to facilitate the integration of CQRS and Event Sourcing patterns in your application.
Domain-centric — Implement complex business logic using domain events.
Event-driven — Efficiently compute query models and initiate actions based on domain events.
Command-oriented — Decouple the application logic from the UI by dispatching commands to designated handlers.
Test-friendly — Validate expected code behavior with Given-When-Then scenarios.
Control-focused — Tailor custom middleware and storage adapters to suit your specific requirements.
Framework-agnostic — Integrate with your preferred framework or use it independently.
Documentation
Documentation can be found here.
A demo application is also available for learning purposes.
Installation
Add Backslash to your project with Composer:
composer require backslashphp/backslash:^2
Requirements
- PHP version 8.1 or higher
json
andpdo
extensions enabled
Testing
vendor/bin/phpunit
Credits
Backslash was crafted in Canada by Maxime Gosselin.
License
The MIT License (MIT). Please see License File for more information.