Skip to content

Replace your regular service calls by Commands and Queries and benefit from middleware functionalities: logging, security, database transaction...

License

Notifications You must be signed in to change notification settings

Mediagone/cqrs-bus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CQRS Bus

⚠️ This project is in experimental phase, the API may change any time.

Latest Version on Packagist Total Downloads Software License

Services are core classes of any application, and keeping them well organized may be a real challenge. Except if you're working on a small RAD or POC project, your services will quickly grow as messy classes.

This package combines two useful patterns:

  • CQRS which separates actions (commands) from data retrieval (queries) services.
  • Chain of Responsibility which involves chains of middlewares to handle these commands and queries. Possibilities offered by middleware buses are endless and easily extensible.

It will help you to:

  • Decouple read and write models.
  • Wrap every service calls with generic behaviors: logging, queuing, security, asynchronous handling...
  • Split your services and repositories into multiple classes (enforce Single Responsibility Principle).

Installation

This package requires PHP 7.4+ and Doctrine ORM 2.7+

Add it as Composer dependency:

$ composer require mediagone/cqrs-bus

License

CQRS Bus is licensed under MIT license. See LICENSE file.

About

Replace your regular service calls by Commands and Queries and benefit from middleware functionalities: logging, security, database transaction...

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages