PHPackages                             buttercup/protects - 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. buttercup/protects

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

buttercup/protects
==================

Buttercup.Protects is a PHP library for building Aggregates that protect business rules, and that announce Domain Events.

2135.0k↓44.9%19[1 issues](https://github.com/buttercup-php/protects/issues)[1 PRs](https://github.com/buttercup-php/protects/pulls)PHP

Since May 8Pushed 10y ago25 watchersCompare

[ Source](https://github.com/buttercup-php/protects)[ Packagist](https://packagist.org/packages/buttercup/protects)[ RSS](/packages/buttercup-protects/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (3)Used By (0)

Buttercup.Protects
==================

[](#buttercupprotects)

**Buttercup.Protects** is a PHP library for building Aggregates that protect business invariants, and that record Domain Events.

[![Build Status](https://camo.githubusercontent.com/514a89757dd96f07affa894255fc90bc9a0acea7819e3f0dc4566e2d779b6387/68747470733a2f2f7472617669732d63692e6f72672f6275747465726375702d7068702f70726f74656374732e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/buttercup-php/protects)

Documentation
-------------

[](#documentation)

Generate the docs with Docco:

```
npm install -g docco
docco tests/Buttercup/Protects/Tests/*

```

Tests
-----

[](#tests)

The documentation doubles as a test suite.

```
php test.php

```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.3% 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/489516?v=4)[Mathias Verraes](/maintainers/mathiasverraes)[@mathiasverraes](https://github.com/mathiasverraes)

---

Top Contributors

[![mathiasverraes](https://avatars.githubusercontent.com/u/489516?v=4)](https://github.com/mathiasverraes "mathiasverraes (58 commits)")[![ronnylt](https://avatars.githubusercontent.com/u/24546?v=4)](https://github.com/ronnylt "ronnylt (1 commits)")

### Embed Badge

![Health badge](/badges/buttercup-protects/health.svg)

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

PHPackages © 2026

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