PHPackages                             phpbehavior/phpbehavior - 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. phpbehavior/phpbehavior

ActiveLibrary

phpbehavior/phpbehavior
=======================

Assert your code respect some behaviors: implement an interface, typehint parameters etc

0.8.0(4y ago)0167MITPHPPHP ^7.4 || ^8.0

Since Oct 23Pushed 4y ago1 watchersCompare

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

READMEChangelog (8)Dependencies (3)Versions (9)Used By (0)

[![Version](https://camo.githubusercontent.com/953c1227ed2873c4c93e364a71e1c39c3790ac6316a72ad5b6ad19b2a6b54a77/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d302e382e302d3442393038312e737667)](https://github.com/phpbehavior/phpbehavior/tree/0.8.0)[![License](https://camo.githubusercontent.com/0fa431acf6694f0bf5cbc17e4e0ba3922b0f5417bac1890b13e4ee9d35a53140/68747470733a2f2f706f7365722e707567782e6f72672f7068706265686176696f722f7068706265686176696f722f6c6963656e7365)](https://github.com/phpbehavior/phpbehavior/blob/master/LICENSE)[![PHP](https://camo.githubusercontent.com/71beaed6f8000ec1bb63dddcebbcda453b115d9a89e7d1921e78e6419c3c7925/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545372e34253743253743253545382e302d626c75652e737667)](https://php.net)[![Lines](https://camo.githubusercontent.com/6feb6db22ca9a8e28691ce59218858ffce688bbca3a4ee0b8a77223a5b9b3930/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64652532306c696e65732d312c3931312d626c75652e737667)](https://camo.githubusercontent.com/6feb6db22ca9a8e28691ce59218858ffce688bbca3a4ee0b8a77223a5b9b3930/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64652532306c696e65732d312c3931312d626c75652e737667)[![Downloads](https://camo.githubusercontent.com/a46bb4e62f4b87427af83ceea11f92e5973ee102528d6cf63b6cabc6b48de9e2/68747470733a2f2f706f7365722e707567782e6f72672f7068706265686176696f722f7068706265686176696f722f646f776e6c6f616473)](https://camo.githubusercontent.com/a46bb4e62f4b87427af83ceea11f92e5973ee102528d6cf63b6cabc6b48de9e2/68747470733a2f2f706f7365722e707567782e6f72672f7068706265686176696f722f7068706265686176696f722f646f776e6c6f616473)

[![CI](https://github.com/phpbehavior/phpbehavior/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/phpbehavior/phpbehavior/actions/workflows/ci.yml)[![Tests](https://camo.githubusercontent.com/929c34813ea559aed8924fea4b48f97a62f9751e1bce39202dd42c663f64ca8e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d31302d626c75652e737667)](https://camo.githubusercontent.com/929c34813ea559aed8924fea4b48f97a62f9751e1bce39202dd42c663f64ca8e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d31302d626c75652e737667)[![Assertions](https://camo.githubusercontent.com/f63db1abfbf0b2bb34e1147e7337cedf6975957aaa363a1d7f1a61b3a6918bad/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f617373657274696f6e732d31332d626c75652e737667)](https://camo.githubusercontent.com/f63db1abfbf0b2bb34e1147e7337cedf6975957aaa363a1d7f1a61b3a6918bad/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f617373657274696f6e732d31332d626c75652e737667)[![Coverage](https://camo.githubusercontent.com/ea5301148bf3bd80c5d31b3b0a64dc12add44c8b93476d77542d5b80eab92d33/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d32382532352d737563636573732e737667)](https://camo.githubusercontent.com/ea5301148bf3bd80c5d31b3b0a64dc12add44c8b93476d77542d5b80eab92d33/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d32382532352d737563636573732e737667)[![Infection](https://camo.githubusercontent.com/9a261c1ecea2db9d1ad7adbf72bdf6df7940505f9b45d145b8d4a56be847222e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696e66656374696f6e2d31302532352d737563636573732e737667)](https://camo.githubusercontent.com/9a261c1ecea2db9d1ad7adbf72bdf6df7940505f9b45d145b8d4a56be847222e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696e66656374696f6e2d31302532352d737563636573732e737667)

phpbehavior/phpbehavior
-----------------------

[](#phpbehaviorphpbehavior)

Work in progress ;)

[Changelog](changelog.md)

Installation
------------

[](#installation)

```
composer require phpbehavior/phpbehavior ^0.8

```

###  Health Score

24

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Every ~4 days

Total

8

Last Release

1579d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e59638521a0ca6412cd2fa506834e384d4bac92197159891d4ccfe8e4b3d61eb?d=identicon)[steevanb](/maintainers/steevanb)

---

Top Contributors

[![steevanb](https://avatars.githubusercontent.com/u/5063383?v=4)](https://github.com/steevanb "steevanb (20 commits)")

### Embed Badge

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

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

###  Alternatives

[codeception/lib-asserts

Assertion methods used by Codeception core and Asserts module

10456.8M14](/packages/codeception-lib-asserts)[lastzero/test-tools

Increases testing productivity by adding a service container and self-initializing fakes to PHPUnit

2244.0k13](/packages/lastzero-test-tools)

PHPackages © 2026

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