Download the PHP package zolta/cqrs without Composer

On this page you can find all versions of the php package zolta/cqrs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cqrs

Zolta CQRS

PHP Version PHPStan Level Laravel Version

CQRS that fits in your stack, not the other way around.

A complete application layer for PHP 8.2+: command/query buses with a decorator pipeline, Result/Option monads for predictable error handling, transactional orchestration with automatic event dispatching, repository abstractions with caching, and automatic handler discovery via PHP 8 attributes. No event sourcing required — but nothing stopping you if you want it.


Why Zolta CQRS?

The problem

Laravel gives you Eloquent, queues, and events — excellent infrastructure. But the application architecture layer between "HTTP request" and "database query" is left as a DIY exercise. Most teams end up with fat controllers, service classes that mix concerns, and event handling scattered across listeners. Testing is painful because business logic is tangled with framework code.

What Zolta CQRS does differently

Approach How it works Trade-off
Ecotone Full messaging framework with aggregates, projections, sagas Heavyweight, steep learning curve, all-or-nothing
Broadway Event sourcing toolkit Requires event sourcing commitment
Spatie Event Sourcing Laravel event sourcing Event-sourcing only, no command/query separation
Tactician Simple command bus Command-only, no queries, no Result monads, no orchestration
Zolta CQRS Decorator-based buses + monads + Application Service orchestration Pragmatic CQRS without event sourcing tax

Zolta CQRS occupies a pragmatic middle ground: you get clean command/query separation, type-safe results, automatic event dispatching, and transactional orchestration — without being forced into full event sourcing. Use as much or as little as your project needs.

Who is this for?


Install

Laravel auto-discovers the service provider. No manual registration needed.

Publish configuration

This creates config/zolta.php with paths to scan for handlers:


Quick Start

1. Define a command

2. Create a handler

3. Add validation (optional)

4. Dispatch

5. Query data

6. Orchestrate with ApplicationService


Architecture

The command bus decorator chain

Commands flow through a composable decorator pipeline — each layer adds one concern:

Every decorator is optional. Need just sync dispatch? Use SynchronousCommandBus directly. Need validation without events? Stack only what you need. The WorkerAwareRoutingCommandBus detects worker context to prevent re-enqueue loops automatically.

Result & Option monads

Commands return Result, queries return Option — no more guessing what a method returns:

No more returning null | array | false | throw from service methods. The type tells you what happened.

ApplicationService orchestration

Multi-command workflows with automatic transactions, result capturing, and response mapping:

Repository framework

Framework-agnostic repositories with 12 filter operators, relation loading, pagination, sorting, field selection, and namespace-scoped caching:

Cache layer uses tagged keys with configurable TTL — RepositoryCache interface with Laravel, APCu, or null implementations.

Message hydration

Automatic construction of Commands, Queries, and Value Objects from raw arrays — no manual new calls:


Performance

Benchmarked on a real application (Laravel 12, PHP 8.3, SQLite):

Component Time (warm)
CommandBus dispatch overhead < 1ms
QueryBus ask overhead < 1ms
ApplicationService wrapping < 2ms
Message hydration (cached class) < 0.6ms
Event dispatching < 1ms
Total CQRS overhead per request < 5ms

The dominant costs in any request are your application logic — database queries, bcrypt hashing, external API calls. The CQRS layer stays invisible.


Features at a glance

Feature Details
Command bus 5-layer decorator chain: sync → validating → event-dispatching → queued → worker-aware
Query bus In-memory with automatic handler resolution and dependency injection
Result monad success(value, events) / failure(error, events) with event accumulation
Option monad some(values) / none() / error(throwable) — null-safe queries
ApplicationService Transactional orchestration, capture store, placeholder resolution, response mapping
Handler discovery #[HandlesCommand] · #[HandlesQuery] · #[ValidatesCommand] · #[HandlesDomainEvent]
Argument resolution Container injection + command/query type matching + variadic support
Message hydration Reflection-cached construction from arrays, nested VO support via Forge
Repository Abstract base + Eloquent impl with 12 filter operators, caching, pagination, sorting
Transactions Auto-commit on Result::success, auto-rollback on Result::failure
Domain events Aggregates record → Results carry → bus dispatches post-commit
Queue integration ShouldQueue marker → automatic defer via ExecuteCommandJob
Framework agnostic PSR-11 core, Laravel adapter with 13 service providers

Part of the Zolta Ecosystem

Zolta CQRS is the application layer — it bridges domain logic and transport:

When used together: HTTP resolves the pipeline via attributes → Forge hydrates the command with validated VOs → CQRS dispatches through the bus, captures events, wraps transactions → HTTP transforms and returns the response. Sub-10ms package overhead for the entire vertical stack.

Package Layer Link
zolta/forge Domain packages/forge
zolta/cqrs Application You are here
zolta/http Transport packages/http

QA

61 tests, 103 assertions covering Result/Option monads, command and query bus dispatch, validator chains, event dispatching, message hydration, and argument resolution.


Documentation

Full documentation is available in the docs/ directory, organized for serving via Nuxt Content.


License

MIT © 2026 Redouane Taleb


All versions of cqrs with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
psr/container Version ^2.0
symfony/process Version ^7.3
symfony/serializer Version ^7.3
symfony/property-access Version ^7.3
symfony/property-info Version ^7.3
zolta/forge Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zolta/cqrs contains the following files

Loading the files please wait ...