PHPackages                             maximecolin/car - 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. maximecolin/car

ActiveLibrary

maximecolin/car
===============

A PHP implementation of the command bus pattern for DDD

1.0.0(11y ago)8252MITPHPPHP &gt;=5.3.0

Since Nov 17Pushed 11y ago3 watchersCompare

[ Source](https://github.com/maximecolin/car)[ Packagist](https://packagist.org/packages/maximecolin/car)[ Docs](http://www.maximecolin.fr)[ RSS](/packages/maximecolin-car/feed)WikiDiscussions master Synced 1mo ago

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

\#Car

Car is a PHP implementation of the Command Bus pattern for DDD.

[![Build Status](https://camo.githubusercontent.com/b0cfaa59dde999e54cf9f683196a684631bf6cc679f94ddfbdc9af79ad23d9e5/68747470733a2f2f7472617669732d63692e6f72672f6d6178696d65636f6c696e2f6361722e737667)](https://travis-ci.org/maximecolin/car)

\##Disclaimer

This is a very basic and simple implementation. It has to grow up :)

\##Installation

```
composer require maximecolin/car

```

\##Purpose

The aim of the command bus pattern is to isolate your domain code in atomic, testable and reusable classes and to execute them through a dedicated service.

\##Usage

A command is an order. It can contains data you need. Attributes can be set on construct, fill through a form, set by other services, ...

```
class CreateArticleCommand implements CommandInterface
{
	public $title;
	public $content;

	public function __construct($title, $content)
	{
		$this->title   = $title;
		$this->content = $content;
	}
}
```

Create an handler which will process your command.

```
class CreateCommandHandler implements CommandHandlerInterface
{
	public function handle(CommandInterface $command)
	{
		// Place here you domain code which create an article ...
	}
}
```

```
// Usually, have a service to get the bus
$bus = new CommandBus();
$bus->addResolver(new ClassNameResolver());

$command = new CreateArticleCommand('My article name', 'My article content');

$bus->execute($command);
```

\##Comming soon

Event sourcing integration.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

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

4195d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7764cab816079637ca314bba86d55e12572b5de17afa66dc1a624b78d5afa405?d=identicon)[maximecolin](/maintainers/maximecolin)

---

Top Contributors

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

---

Tags

commanddddpatternbuscqrs

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/maximecolin-car/health.svg)

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

###  Alternatives

[broadway/broadway

Infrastructure and testing helpers for creating CQRS and event sourced applications.

1.5k2.0M53](/packages/broadway-broadway)[prooph/service-bus

PHP Enterprise Service Bus Implementation supporting CQRS and DDD

4421.4M32](/packages/prooph-service-bus)[ecotone/ecotone

Supporting you in building DDD, CQRS, Event Sourcing applications with ease.

558549.8k17](/packages/ecotone-ecotone)[broadway/broadway-bundle

Symfony bundle for broadway/broadway.

68853.8k7](/packages/broadway-broadway-bundle)[prooph/service-bus-symfony-bundle

88392.2k3](/packages/prooph-service-bus-symfony-bundle)[ecotone/laravel

Laravel integration for Ecotone

21307.6k3](/packages/ecotone-laravel)

PHPackages © 2026

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