PHPackages                             nuvolapl/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. nuvolapl/cqrs

ActiveLibrary

nuvolapl/cqrs
=============

CQRS

1.0.0(6y ago)060PHPPHP ^7.3

Since Jul 5Pushed 6y agoCompare

[ Source](https://github.com/nuvolapl/cqrs)[ Packagist](https://packagist.org/packages/nuvolapl/cqrs)[ RSS](/packages/nuvolapl-cqrs/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

CQRS [![CircleCI](https://camo.githubusercontent.com/0a7e72f590624ecef1d7fa013dc44a60220c530352560ff1d8b9972051153028/68747470733a2f2f636972636c6563692e636f6d2f67682f6e75766f6c61706c2f637172732f747265652f6d61737465722e7376673f7374796c653d737667)](https://circleci.com/gh/nuvolapl/cqrs/tree/master)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#cqrs-)

CQRS abstraction for your application

Installation
============

[](#installation)

```
composer req nuvolapl/cqrs
```

Usage
=====

[](#usage)

```
class AccountController
{
    /**
     * @var SystemInterface
     */
    private $system;

    public function __construct(SystemInterface $system)
    {
        $this->system = $system;
    }

    public function post(array $payload): void
    {
        $command = new CreateAccountCommand(
            $payload['name'],
            $payload['confirmed'],
            new \DateTimeImmutable()
        );

        $this->system->command($command);
    }

    public function get(int $id): Account
    {
        return $this->system->query(
            new GetAccountByIdQuery($id)
        );
    }

    /**
     * {@inheritdoc}
     *
     * @return Account[]
     */
    public function getCollection(array $query): array
    {
        $collection = $this->system->query(
            new GetAccountCollectionQuery(
                $query['limit'],
                $query['offset']
            )
        );

        return \iterator_to_array($collection);
    }
}
```

Example
=======

[](#example)

- [Basic](/example/public/basic.php) - manual route configuration
- [Magic](/example/public/magic.php) - auto route configuration

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

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

2500d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/03053dbb811842a45c0b7978c07fa9051c9811a8005b7fee1eb647033b7a814a?d=identicon)[nuvolapl](/maintainers/nuvolapl)

---

Top Contributors

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

---

Tags

cqrsphp

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

PHPackages © 2026

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