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

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

widmogrod/php-exceptions
========================

Collection PHP exceptions grouped by functionality with nice ::assert API

0.1.0(11y ago)1300.5k↓19%MITPHP

Since Feb 26Pushed 11y ago1 watchersCompare

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

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

PHP Exceptions [![Build Status](https://camo.githubusercontent.com/4670ce05ee5db23dc09ad6ee33af73086d6900c7adb77e436d926a32a13bb0d5/68747470733a2f2f7472617669732d63692e6f72672f7769646d6f67726f642f7068702d657863657074696f6e732e737667)](https://travis-ci.org/widmogrod/php-exceptions)
==========================================================================================================================================================================================================================================================================================

[](#php-exceptions-)

Introduction
------------

[](#introduction)

How many times you throw exceptions in your code? and how many of them are repeating?

This library collects general use cases and provide nice ::assert API.

Use it, don't waste your development time for custom exceptions, use one of our exceptions classes.

Usage
-----

[](#usage)

Tired of writing `is_array($value) || $value instanceof \Traversable`? Use predefined assertions and save your time, like so:

```
use Exception\InvalidTypeException;

function thatCanCantBeViolated($arrayOrTraversable) {
    InvalidTypeException::assertIsTraversable($arrayOrTraversable);
    // do your regular work
}
```

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

[](#installation)

```
composer require widmogrod/php-exceptions

```

Development
-----------

[](#development)

This repository follows [semantic versioning concept](http://semver.org/). If you want to contribute, just follow [GitHub workflow](https://guides.github.com/introduction/flow/) and open a pull request.

Testing
-------

[](#testing)

Quality assurance is brought to you by [PHPSpec](http://www.phpspec.net/)

```
composer test

```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

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

4145d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/511338e7e9e4e1e5a7c99656dc2c746fe72c5680486c38504d244437c34555c0?d=identicon)[widmogrod](/maintainers/widmogrod)

---

Top Contributors

[![widmogrod](https://avatars.githubusercontent.com/u/164249?v=4)](https://github.com/widmogrod "widmogrod (6 commits)")

### Embed Badge

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

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

###  Alternatives

[prestashop/autoindex

Automatically add an 'index.php' in all the current or specified directories and all sub-directories.

121.6M9](/packages/prestashop-autoindex)[reworck/filament-settings

Manage your settings in filament for spatie/valuestore

433.6k](/packages/reworck-filament-settings)

PHPackages © 2026

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