PHPackages                             ixnode/php-exception - 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. ixnode/php-exception

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

ixnode/php-exception
====================

PHP Exception - This library offers some ready to use PHP Exceptions.

0.1.22(1y ago)27.9k↓27.6%10MITPHPPHP ^8.2

Since Dec 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ixnode/php-exception)[ Packagist](https://packagist.org/packages/ixnode/php-exception)[ RSS](/packages/ixnode-php-exception/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (24)Used By (10)

PHP Exception
=============

[](#php-exception)

[![Release](https://camo.githubusercontent.com/4fd61859533309ca82452524ad2fc772212695c442e712220f51bad4ba3d1629/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f69786e6f64652f7068702d657863657074696f6e)](https://github.com/ixnode/php-exception/releases)[![PHP](https://camo.githubusercontent.com/1bbf13029689f8044cc3080b0010efacbee3d0ccebdcf17e9538990f0f53a6c8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e302d3737376262332e7376673f6c6f676f3d706870266c6f676f436f6c6f723d7768697465266c6162656c436f6c6f723d353535353535267374796c653d666c6174)](https://www.php.net/supported-versions.php)[![PHPStan](https://camo.githubusercontent.com/973bd3af16ac962a6eb7191062ceb018266116d863d18ee07b970e1d9b3e3c4f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d4c6576656c2532304d61782d627269676874677265656e2e7376673f7374796c653d666c6174)](https://phpstan.org/user-guide/rule-levels)[![PHPCS](https://camo.githubusercontent.com/ab66c01daa05a9d45a542da43bd296d4f26384943f0ad0fc4c3f6b9916a2b62b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50485043532d50535231322d627269676874677265656e2e7376673f7374796c653d666c6174)](https://www.php-fig.org/psr/psr-12/)[![LICENSE](https://camo.githubusercontent.com/cae5628f22ec415e638619a6e91fa36279687473ce4b178944bb19dcf77e4f1d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69786e6f64652f7068702d657863657074696f6e)](https://github.com/ixnode/php-exception/blob/master/LICENSE)

> This library offers some ready to use PHP Exceptions.

Exception Classes
-----------------

[](#exception-classes)

### Group `Array`

[](#group-array)

`Array`   ![]()
Name ![]()
Parameter ![]()
Usage     `ArrayKeyNotFoundException`  `string $key`  Used to indicate that a key in an array does not exist.   `ArrayCountException`  `none`  Used to indicate that two given arrays do not match in size.  ### Group `Case`

[](#group-case)

`Case`   ![]()
Name ![]()
Parameter ![]()
Usage     `CaseInvalidException`  `string $given`
`array $expected`  Used to indicate that a specified case is not supported (match, switch, etc.).   `CaseUnsupportedException`  `string $case`  Used to indicate that a specified case is not supported (logic missing things, etc.).  ### Group `Class`

[](#group-class)

`Class`   ![]()
Name ![]()
Parameter ![]()
Usage     `ClassInvalidException` `string $class`
`string $expected` Used to indicate that a given or passed class is invalid.  ### Group `Configuration`

[](#group-configuration)

`Configuration`   ![]()
Name ![]()
Parameter ![]()
Usage     `ConfigurationMissingException` `string $hint` Used to indicate that a configuration or an action is missing.  ### Group `Db`

[](#group-db)

`Db`   ![]()
Name ![]()
Parameter ![]()
Usage     `DbEntityNotFoundException` `string $class` Used to indicate that a db entity was not found.  ### Group `File`

[](#group-file)

`File`   ![]()
Name ![]()
Parameter ![]()
Usage     `FileNotFoundException` `string $path` Used to indicate that a given file was not found.   `FileNotReadableException` `string $path` Used to indicate that a given file is not readable.   `FileNotWriteableException` `string $path` Used to indicate that a file cannot be written.  ### Group `Function`

[](#group-function)

`Function`   ![]()
Name ![]()
Parameter ![]()
Usage     `FunctionCurlExecException` `string $error`
`string $url` Used to indicate that the curl\_exec function is not working properly.   `FunctionFOpenException` `none` Used to indicate that the function fopen does not work properly.   `FunctionJsonEncodeException` `none` Used to indicate that an object cannot be converted into a JSON string.   `FunctionReplaceException` `string $replacePattern` Used to indicate that a value could not be replaced (str\_replace, preg\_replace, etc.).  ### Group `Parser`

[](#group-parser)

`Parser`   ![]()
Name ![]()
Parameter ![]()
Usage     `ParserException` `string $parseString`
`string $context` Used to indicate that a given string could not be parsed.  ### Group `Type`

[](#group-type)

`Type`   ![]()
Name ![]()
Parameter ![]()
Usage     `TypeInvalidException` `string $expected`
`?string $given = null` Used to indicate that a given or passed variable is the wrong type.  Installation
------------

[](#installation)

```
composer require ixnode/php-exception
```

```
vendor/bin/php-exception -V
```

```
php-exception 0.1.0 (12-30-2022 11:41:25) - Björn Hempel
```

Usage
-----

[](#usage)

```
use Ixnode\PhpException\FileNotFoundException;
```

```
throw new FileNotFoundException('path-to-file');
```

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

[](#development)

```
git clone git@github.com:ixnode/php-exception.git && cd php-exception
```

```
composer install
```

```
composer test
```

License
-------

[](#license)

This tool is licensed under the MIT License - see the [LICENSE](/LICENSE) file for details

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity58

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

Recently: every ~170 days

Total

23

Last Release

527d ago

PHP version history (2 changes)0.1.0PHP ^8.0

0.1.21PHP ^8.2

### Community

Maintainers

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

---

Top Contributors

[![bjoern-hempel](https://avatars.githubusercontent.com/u/5531245?v=4)](https://github.com/bjoern-hempel "bjoern-hempel (45 commits)")

---

Tags

exceptionexception-handlingphpphp8phpexceptionexception handlingphp8php82

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ixnode-php-exception/health.svg)

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

###  Alternatives

[yaroslavche/bitmask

BitMask, EnumBitMask

3453.7k1](/packages/yaroslavche-bitmask)[marcin-orlowski/lombok-php

Never write boilerplate code for your data class again!

3118.6k1](/packages/marcin-orlowski-lombok-php)[andreas-glaser/php-helpers

A comprehensive collection of PHP utility functions for array manipulation, string operations, date handling, HTML generation, form building, validation, and more. Modern PHP 8.2+ library with full type safety.

1386.5k2](/packages/andreas-glaser-php-helpers)[phpattempt/phpattempt

Helper function to enforce error-first approach in your code

1710.4k](/packages/phpattempt-phpattempt)

PHPackages © 2026

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