PHPackages                             guiwoda/domain-requirements - 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. guiwoda/domain-requirements

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

guiwoda/domain-requirements
===========================

0.1.0(11y ago)018MITPHP

Since Sep 22Pushed 11y ago1 watchersCompare

[ Source](https://github.com/guiwoda/domain-requirements)[ Packagist](https://packagist.org/packages/guiwoda/domain-requirements)[ RSS](/packages/guiwoda-domain-requirements/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

DomainRequirements
==================

[](#domainrequirements)

This package aims to provide a simple and semantic way of decoupling your presentation needs from your domain objects.

The problem
-----------

[](#the-problem)

As we build websites, we often start up with straightforward pages that reflect our data structure. The `Controllers` we build usually depend on some `Repository` or adapter `Service` that works as a data abstraction. As the system grows though, this `Controllers` start depending on multiple of this objects, and the role of the `Controller`ends up as a huge coordinator of different parts of our Domain Model.

We recognize this as a problem immediately, and move this logic to our `Domain` layer. This creates a different architecture, where any new data needed by the presentation layer requires changes in our coordination objects inside our `Domain`, which is a long way to say we have coupled our `Domain` to our presentation needs!

The proposed solution
---------------------

[](#the-proposed-solution)

The connection between `Controllers` and the `Domain` is usually done through encapsulation. The dependency arrows always point **to** the `Domain`. But there are *implicit* dependencies that are pointing outwards **from** the `Domain`, and that is what this package aims to change.

Each controller would create a (set of) `Requirement` object(s). This `Requirements` are POPOs that will work as `Data Transfer Objects` between our presentation layer and the domain. In this objects, the `Controller` will list all its `Domain` dependencies, and will include also all associated parameters that will be needed to resolve this dependencies.

`Requirement` objects will be sent to a `Responsible` object to be resolved. This `Responsibles` should be associated beforehand in an identity map fashion, indicating what `Domain need` they promise to resolve. A `CallbackResponsible` implementation is provided as an easy way to start using this pattern without changing any of your objects' interface. If a callback is not enough, any object can implement `Responsible` and respond to a `Requirement`.

TL;DR
-----

[](#tldr)

Use `Requirements` to list what you expect from the `Domain`. Use `Responsibles` to respond to those needs. Oh, and **always program to an interface!**

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

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

4301d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/34c0365f697eb3491eb619d8cad1f38bc68c7b7140842a7492c6a9d8753a07d5?d=identicon)[guiwoda](/maintainers/guiwoda)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/guiwoda-domain-requirements/health.svg)

```
[![Health](https://phpackages.com/badges/guiwoda-domain-requirements/health.svg)](https://phpackages.com/packages/guiwoda-domain-requirements)
```

PHPackages © 2026

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