molibdenius / cqrs
CQRS library
dev-development
2025-06-19 11:32 UTC
Requires
- php: >=8.3
- psr/container: ^2.0
- psr/http-factory: ^1.1
- psr/http-message: ^2.0
- psr/log: ^3.0
- spiral/roadrunner-http: ^3.5
- spiral/roadrunner-jobs: ^4.6
- symfony/event-dispatcher: ^7.2
- symfony/event-dispatcher-contracts: ^3.5
- symfony/serializer: ^7.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.75
- phpunit/phpunit: ^12.1
- spiral-packages/profiler: ^1.2
- symfony/var-dumper: ^7.3
- vimeo/psalm: ^6.11
This package is not auto-updated.
Last update: 2025-06-19 14:10:40 UTC
README
A modern PHP 8.3+ implementation of the Command Query Responsibility Segregation (CQRS) pattern, built with performance and scalability in mind.
โจ Features
- ๐ HTTP and Queue-based Command Processing
- ๐ Asynchronous Task Processing with RoadRunner
- ๐ฆ Dependency Injection with PSR-11 Container
- ๐ฏ Event-Driven Architecture using Symfony Event Dispatcher
- ๐ PSR-7/PSR-17 HTTP Messages for request/response handling
- ๐ Built-in Retry Mechanism for failed tasks
- ๐ Logging with PSR-3 compatible loggers
- ๐งช Strict Types and modern PHP 8.3+ features
๐ Requirements
- PHP 8.3 or higher
- RoadRunner
- Composer
๐ Installation
composer require molibdenius/cqrs
๐ Project Structure
src/
โโโ ActionBus/ # Command/Query bus implementation
โโโ Dispatcher/ # HTTP and Queue dispatchers
โโโ Event/ # Event classes and subscribers
โโโ EventLoop/ # Event loop implementations
โโโ Exception/ # Custom exceptions
โโโ Registry/ # Action and handler registry
โโโ Result/ # Result objects
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ง Contact
- Email: molibdenius@gmail.com