PHPackages                             brdd/brdd-php - 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. brdd/brdd-php

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

brdd/brdd-php
=============

Business Rule Driven Design (BRDD) core interfaces and contexts for PHP.

00PHP

Since May 2Pushed 2mo agoCompare

[ Source](https://github.com/brdd-design/brdd-php)[ Packagist](https://packagist.org/packages/brdd/brdd-php)[ RSS](/packages/brdd-brdd-php/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

🐘 BRDD PHP
==========

[](#-brdd-php)

[![Packagist Version](https://camo.githubusercontent.com/09e44a3bb0cb493ca21884c57125671ec79942256b0350108444ccfecafd5ff0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f627264642f627264642d7068703f6c6162656c3d7061636b6167697374)](https://packagist.org/packages/brdd/brdd-php)

This repository contains the official **Business Rule Driven Design (BRDD)** interfaces and contexts tailored for PHP 8.1+. It enforces strict architectural boundaries, ensuring that orchestrators, validation engines, and side effects remain decoupled.

🚀 Installation
--------------

[](#-installation)

```
composer require brdd/brdd-php
```

🛠 Basic Usage Example
---------------------

[](#-basic-usage-example)

```
use Brdd\Contracts\UseCase;
use Brdd\Contexts\ExecutionContext;

class SubmitAssignmentUseCase implements UseCase {
    // Inject services via constructor...

    public function execute($input): ExecutionContext {
        $enrichedData = $this->enrichService->enrich($input);
        $validationContext = $this->validateService->validate($enrichedData);

        $context = ExecutionContext::build("US_SUBMIT", $validationContext);

        if ($validationContext->hasErrors()) {
            return $context;
        }

        $result = $this->businessService->execute($enrichedData);

        $context->addSetter('SET_ID', $result->id);

        $context->addEffect(ExecutionContext::POST_EFFECT, 'EFF_NOTIFY', function() use ($result) {
            $this->clientService->call($result);
        });

        $context->setData($result);
        return $context;
    }
}
```

🤖 AI-First Development
----------------------

[](#-ai-first-development)

Check the [AI Guidelines](./AI_GUIDELINES.md) for more details.

📚 Documentation
---------------

[](#-documentation)

- [Technical Spec](https://github.com/brdd-design/brdd/blob/main/BRDD.md)
- [Practical Example](https://github.com/brdd-design/brdd/blob/main/core/articles/EN/BRDD-PRACTICAL-EXAMPLE.md)

📄 License
---------

[](#-license)

MIT

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance56

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/279069504?v=4)[defoltech](/maintainers/defoltech)[@defoltech](https://github.com/defoltech)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/brdd-brdd-php/health.svg)

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

###  Alternatives

[php-stubs/generator

Generate stubs from any PHP code for IDE completion and static analysis.

82333.6k65](/packages/php-stubs-generator)[dcblogdev/laravel-companies-house

A Laravel Companies House package

1017.3k](/packages/dcblogdev-laravel-companies-house)

PHPackages © 2026

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