PHPackages                             neighborhoods/throwable-diagnostic-component - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. neighborhoods/throwable-diagnostic-component

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

neighborhoods/throwable-diagnostic-component
============================================

A Service Agnostic Component for diagnosing Throwables.

4.0.3(4y ago)16.2k[2 PRs](https://github.com/neighborhoods/ThrowableDiagnosticComponent/pulls)5MITPHPPHP ^7.0|^8.0

Since Oct 2Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/neighborhoods/ThrowableDiagnosticComponent)[ Packagist](https://packagist.org/packages/neighborhoods/throwable-diagnostic-component)[ RSS](/packages/neighborhoods-throwable-diagnostic-component/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (14)Versions (21)Used By (5)

Throwable Diagnostic Component
==============================

[](#throwable-diagnostic-component)

A Service Agnostic Component for diagnosing `Throwables`.

The `ThrowableDiagnostic` can determine if a `Throwable` happened because of a permanent or transient fault (network issues, database down, 3rd party service unavailable).

Every `Throwable` is by default considered permanent, but certain `Throwables` are known to be transient. With custom diagnostic logic such cases can be identified.

Diagnostic logic for common cases like RDBMS and AWS are available out of the box. Defining your own diagnostic logic is straightforward.

Install
-------

[](#install)

Via Composer

```
$ composer require neighborhoods/throwable-diagnostic-component
```

### Versioning

[](#versioning)

Don't confuse releases on [packagist](https://packagist.org/packages/neighborhoods/throwable-diagnostic-component), e.g. 3.0.0, with versions of components contained within this package, e.g. AwsSqsV1. One release may contain multiple versions of the same component.
Parts of your code may use older versions of components, while others use the latest.

### Upgrade

[](#upgrade)

For upgrading from release 3 to release 4 follow the [Upgrade Guide](docs/UpgradeGuide.md).

Usage
-----

[](#usage)

Components fall into one of two categories

- Throwable Diagnostic
- Throwable Diagnostic Decorator

The Throwable Diagnostic defines the core concept of how this works. The Throwable Diagnostic mostly contains interfaces. It determines how user code diagnoses a Throwable, how the decorators look, and how to define the stack of decorators to be used. You may think of it as a framework/skeleton/scaffolding.
There might be multiple versions of throwable diagnostic, e.g. ThrowableDiagnosticV1 and ThrowableDiagnosticV2.

A Throwable Diagnostic Decorator is in charge of diagnosing certain `Throwables`. For example, the `GuzzleV1` component has a decorator which decides if an exception originating from guzzle is transient or not. During the diagnostic process a `Throwable` can be inspected by multiple decorators, each of which may decide that the `Throwable` is transient, permanent, or should be passed to the next decorator. A throwable diagnostic decorator is made for a specific version of Throwable Diagnostic. All decorators compatible with ThrowableDiagnosticV1 are placed in the `src/ThrowableDiagnosticV1Decorators` folder.
There are decorators for different `Throwables`. Diagnostic logic for certain `Throwables` may have multiple versions, e.g. GuzzleV1, GuzzleV2. Use the latest version if possible. The versions here do not correspond to versions of guzzle, rather versions of the specific decorator. You can implement your own decorator to properly handle `Throwables` which are specific to your own code, or a package for which a decorator is not available.

For usage details and list of predefined decorators please refer to the corresponding Throwable Diagnostic version.

- [ThrowableDiagnosticV1](src/ThrowableDiagnosticV1/README.md)

Buphalo integration
-------------------

[](#buphalo-integration)

[Buphalo](https://github.com/neighborhoods/Buphalo) templates are available for actors using throwable diagnostic, custom throwable diagnostic decorators as well as their accompanying files.

### Prerequisites

[](#prerequisites)

The Buphalo templates are provided in a custom template tree. Support for multiple template trees has been added to Buphalo in version 1.1. Ensure you have Buphalo version 1.1 or above installed.
You probably have a script in your project's bin folder running `vendor/bin/buphalo` with all the needed environment variables. Edit the environment variable for template tree directory paths to include the template tree contained in this package. The environment variable definition might be as below.

```
Neighborhoods_Buphalo_V1_TemplateTree_Map_Builder_FactoryInterface__TemplateTreeDirectoryPaths=default:$PWD/vendor/neighborhoods/buphalo/template-tree/V1,diagnostic:$PWD/vendor/neighborhoods/throwable-diagnostic-component/template-tree/BuphaloV1
```

The export above assumes that you have no other custom template trees.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance55

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 80.6% 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 ~17 days

Recently: every ~9 days

Total

16

Last Release

1787d ago

Major Versions

0.0.0-alpha → 1.0.02020-10-07

1.0.0 → 2.0.02020-10-12

2.2.2 → 3.0.02020-11-13

3.0.3 → 4.0.02021-05-10

PHP version history (2 changes)0.0.0-alphaPHP ^7.0

4.0.1PHP ^7.0|^8.0

### Community

Maintainers

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

---

Top Contributors

[![Firtzberg](https://avatars.githubusercontent.com/u/8490119?v=4)](https://github.com/Firtzberg "Firtzberg (75 commits)")[![nico-spada-virtasant](https://avatars.githubusercontent.com/u/68550127?v=4)](https://github.com/nico-spada-virtasant "nico-spada-virtasant (11 commits)")[![rhift](https://avatars.githubusercontent.com/u/1008958?v=4)](https://github.com/rhift "rhift (5 commits)")[![arielallon](https://avatars.githubusercontent.com/u/1356396?v=4)](https://github.com/arielallon "arielallon (2 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/neighborhoods-throwable-diagnostic-component/health.svg)

```
[![Health](https://phpackages.com/badges/neighborhoods-throwable-diagnostic-component/health.svg)](https://phpackages.com/packages/neighborhoods-throwable-diagnostic-component)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M650](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)

PHPackages © 2026

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