PHPackages                             nontre/cqrs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nontre/cqrs

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nontre/cqrs
===========

Common interfaces for CQRS pattern

v1.0.0(1y ago)08MITPHPPHP ^8.0

Since May 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Nontre12/php-cqrs)[ Packagist](https://packagist.org/packages/nontre/cqrs)[ Docs](https://github.com/Nontre12/php-cqrs)[ RSS](/packages/nontre-cqrs/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

CQRS Library for PHP
====================

[](#cqrs-library-for-php)

Overview
--------

[](#overview)

This library provides interfaces and base classes for implementing the Command Query Responsibility Segregation (CQRS) pattern in PHP. CQRS is a design pattern that separates read and write operations into different models to optimize performance, scalability, and security. This library is designed to simplify the implementation of CQRS in your PHP projects.

Features
--------

[](#features)

- **Command Handlers**: Interfaces and base classes to handle commands.
- **Query Handlers**: Interfaces and base classes to handle queries.
- **Event Sourcing Support**: Basic support for event sourcing.
- **Dependency Injection Ready**: Designed to work seamlessly with DI frameworks.
- **Extensible**: Easily extend the provided interfaces and base classes to fit your specific needs.

Installation
------------

[](#installation)

You can install the library via Composer or by including the source code in your project.

### Composer

[](#composer)

```
composer require nontre/cqrs
```

### Manual

[](#manual)

Include the source code files in your project. Ensure you maintain the directory structure.

Getting Started
---------------

[](#getting-started)

To get started with this CQRS library, follow these steps:

1. **Define Commands and Queries**: Create classes for your commands and queries.
2. **Implement Handlers**: Implement command and query handlers using the provided interfaces.
3. **Register Handlers**: Register your handlers with your dependency injection framework.

Acknowledgements
----------------

[](#acknowledgements)

A significant portion of the source code for this library was extracted and adapted from the CodelyTV repository. We are grateful to CodelyTV for their excellent resources and contributions to the development community. [🐘🎯 Hexagonal Architecture + DDD + CQRS in PHP using Symfony 6](https://github.com/CodelyTV/php-ddd-example)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

714d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/40b6f4657fe2226fb55530158c725e6c262ab4a046f9e790a1b0b11ea955060d?d=identicon)[nontre](/maintainers/nontre)

---

Top Contributors

[![Nontre12](https://avatars.githubusercontent.com/u/62849884?v=4)](https://github.com/Nontre12 "Nontre12 (4 commits)")

---

Tags

cqrsinterfacephp

### Embed Badge

![Health badge](/badges/nontre-cqrs/health.svg)

```
[![Health](https://phpackages.com/badges/nontre-cqrs/health.svg)](https://phpackages.com/packages/nontre-cqrs)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
