PHPackages                             nubium/this-should-never-happen-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. nubium/this-should-never-happen-exception

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

nubium/this-should-never-happen-exception
=========================================

Extend this exception and throw it anytime something unexpected happens.

v1.0(8y ago)220.3k↓50%1MITPHP

Since Mar 27Pushed 7y ago6 watchersCompare

[ Source](https://github.com/nubium/this-should-never-happen-exception)[ Packagist](https://packagist.org/packages/nubium/this-should-never-happen-exception)[ RSS](/packages/nubium-this-should-never-happen-exception/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

ThisShouldNeverHappenException
==============================

[](#thisshouldneverhappenexception)

[![Build Status](https://camo.githubusercontent.com/10aba9ac658f834570974be3bd2241da610d3a9f338be706510a8a9c3c56fd11/68747470733a2f2f7472617669732d63692e6f72672f6e756269756d2f746869732d73686f756c642d6e657665722d68617070656e2d657863657074696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/nubium/this-should-never-happen-exception)[![Downloads this Month](https://camo.githubusercontent.com/4c22e1c77333896396ea814820628f9a59512b06ee2a3736fdf83258612a5534/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6e756269756d2f746869732d73686f756c642d6e657665722d68617070656e2d657863657074696f6e2e737667)](https://packagist.org/packages/nubium/this-should-never-happen-exception)[![Latest Stable Version](https://camo.githubusercontent.com/a8872d686816a6383b8f18f1f39adf37bac9a45b339561e2ef7648512b2d660d/68747470733a2f2f706f7365722e707567782e6f72672f6e756269756d2f746869732d73686f756c642d6e657665722d68617070656e2d657863657074696f6e2f762f737461626c65)](https://github.com/nubium/this-should-never-happen-exception/releases)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://github.com/nubium/this-should-never-happen-exception/blob/master/LICENSE)

There is something which should never happen in every application :)

Usage
-----

[](#usage)

```
switch ($oneOrTwoNothingElse) {
    case 1:
        echo 1;
        break;
    case 2:
        echo 2;
        break;
    default:
        throw new ThisShouldNeverHappenException('Unexpected input.');
}
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

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

Unknown

Total

1

Last Release

2974d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2878126?v=4)[Northys](/maintainers/Northys)[@northys](https://github.com/northys)

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

---

Top Contributors

[![northys](https://avatars.githubusercontent.com/u/2878126?v=4)](https://github.com/northys "northys (7 commits)")

---

Tags

exceptionphp

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/nubium-this-should-never-happen-exception/health.svg)

```
[![Health](https://phpackages.com/badges/nubium-this-should-never-happen-exception/health.svg)](https://phpackages.com/packages/nubium-this-should-never-happen-exception)
```

PHPackages © 2026

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