PHPackages                             cline/assert - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. cline/assert

ActiveLibrary[Testing &amp; Quality](/categories/testing)

cline/assert
============

Assertion library for PHP 8.4+

4.0.3(2mo ago)02.3k↓20.5%MITPHPPHP ^8.5.0CI failing

Since Oct 24Pushed 2mo agoCompare

[ Source](https://github.com/faustbrian/assert)[ Packagist](https://packagist.org/packages/cline/assert)[ RSS](/packages/cline-assert/feed)WikiDiscussions 4.x Synced 1mo ago

READMEChangelog (9)Dependencies (22)Versions (18)Used By (0)

[![GitHub Workflow Status](https://github.com/faustbrian/assert/actions/workflows/quality-assurance.yaml/badge.svg)](https://github.com/faustbrian/assert/actions)[![Latest Version on Packagist](https://camo.githubusercontent.com/f1f9ba8cbb0379a60bdb414e150fe5f10d8efa7f69d4c0a06251bf1d36e3eba0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636c696e652f6173736572742e737667)](https://packagist.org/packages/cline/assert)[![Software License](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/d3e2901cc5b38facd9627560d8363084f3f297e3d31548ba438ddba661340ab7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636c696e652f6173736572742e737667)](https://packagist.org/packages/cline/assert)

---

This library provides a comprehensive assertion library for PHP 8.4+, enabling robust validation and preconditions for your code.

Requirements
------------

[](#requirements)

> **Requires [PHP 8.4+](https://php.net/releases/)**

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

[](#installation)

```
composer require cline/assert
```

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

[](#documentation)

### Getting Started

[](#getting-started)

- **[Getting Started](https://docs.cline.sh/assert/getting-started/)** - Introduction to assertions and basic usage
- **[Expect API](https://docs.cline.sh/assert/expect-api/)** - Jest/Pest-style fluent expectations

### Assertion Types

[](#assertion-types)

- **[String Assertions](https://docs.cline.sh/assert/string-assertions/)** - String validation and checks
- **[Numeric Assertions](https://docs.cline.sh/assert/numeric-assertions/)** - Number validation and comparisons
- **[Array Assertions](https://docs.cline.sh/assert/array-assertions/)** - Array validation and operations
- **[Type Assertions](https://docs.cline.sh/assert/type-assertions/)** - Type checking and validation
- **[Comparison Assertions](https://docs.cline.sh/assert/comparison-assertions/)** - Value comparison utilities
- **[Object Assertions](https://docs.cline.sh/assert/object-assertions/)** - Object property and method checks
- **[Boolean Assertions](https://docs.cline.sh/assert/boolean-assertions/)** - Boolean value validation
- **[Null and Empty Assertions](https://docs.cline.sh/assert/null-empty-assertions/)** - Null and empty checks
- **[File System Assertions](https://docs.cline.sh/assert/filesystem-assertions/)** - File and directory validation
- **[Validation Assertions](https://docs.cline.sh/assert/validation-assertions/)** - Email, URL, and format validation

### Advanced Usage

[](#advanced-usage)

- **[Custom Assertions](https://docs.cline.sh/assert/custom-assertions/)** - Creating custom assertion rules
- **[Lazy Assertions](https://docs.cline.sh/assert/lazy-assertions/)** - Batch validation and error collection
- **[Assertion Chains](https://docs.cline.sh/assert/assertion-chains/)** - Fluent assertion interface

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please use the [GitHub security reporting form](https://github.com/faustbrian/assert/security) rather than the issue queue.

Credits
-------

[](#credits)

- [Brian Faust](https://github.com/faustbrian)
- [Benjamin Eberlei](https://github.com/beberlei)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License. Please see [License File](LICENSE.md) for more information.

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance88

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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 ~9 days

Recently: every ~3 days

Total

16

Last Release

61d ago

Major Versions

1.0.0 → 2.0.02025-10-25

2.0.0 → 3.0.02025-10-28

2.4.0 → 3.4.02026-01-30

3.x-dev → 4.0.02026-03-04

PHP version history (2 changes)1.x-devPHP ^8.4.0

3.1.0PHP ^8.5.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/22145591?v=4)[Brian Faust](/maintainers/faustbrian)[@faustbrian](https://github.com/faustbrian)

---

Top Contributors

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

---

Tags

phptestingvalidationassertassertionspreconditions

###  Code Quality

TestsPest

### Embed Badge

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

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

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[defstudio/pest-plugin-laravel-expectations

A plugin to add laravel tailored expectations to Pest

98548.9k4](/packages/defstudio-pest-plugin-laravel-expectations)[illuminated/testing-tools

Laravel-specific Testing Helpers and Assertions.

5420.4k17](/packages/illuminated-testing-tools)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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