PHPackages                             blacksmith-project/dr-watson - 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. blacksmith-project/dr-watson

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

blacksmith-project/dr-watson
============================

A PHP library enhancing `\\Exception`.

v0.3.0(7y ago)05461MITPHP

Since Jan 12Pushed 7y agoCompare

[ Source](https://github.com/BlacksmithProject/DrWatson)[ Packagist](https://packagist.org/packages/blacksmith-project/dr-watson)[ RSS](/packages/blacksmith-project-dr-watson/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (6)Versions (6)Used By (1)

BlacksmithProject - DrWatson
============================

[](#blacksmithproject---drwatson)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/293582ebdde8dd267bcd566376d451daab1ecbd4fe52b78c482f269e932f5826/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f426c61636b736d69746850726f6a6563742f4472576174736f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/BlacksmithProject/DrWatson/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/8f23fe6ac45184adfff33f00253a99c2571b479c386e2f1af7ff3d9ccc39fe37/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f426c61636b736d69746850726f6a6563742f4472576174736f6e2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/BlacksmithProject/DrWatson/?branch=master)[![Build Status](https://camo.githubusercontent.com/110d10b6875a67a824807f268c8ba633cc8b174588c362eb78e7f7947dbd148b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f426c61636b736d69746850726f6a6563742f4472576174736f6e2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/BlacksmithProject/DrWatson/build-status/master)

A PHP library enhancing `\Exception`.

Why ?
-----

[](#why-)

`\Exception` does not provide enough information to debug easily.

Indeed, stacktrace can sometime be hard to understand, and message can be insufficient.

`DrWatson` is the developper personal investigation assistant, providing type, suspect and help.

Installation:
-------------

[](#installation)

`composer require blacksmith-project/dr-watson`

How to use it:
--------------

[](#how-to-use-it)

You can throw a `DrWatson::report`.

- type should tell you if the exception is an input issue, domain or internal.

> That will help you to know quickly who failed and what quick deduction you can make:
>
> - Input = User failed, let him know.
> - Domain = Further investigation on the code is necessary.
> - Internal = Inspect the code, but maybe some infrastructure failed (BDD for example).

- suspect should help you target quickly to the right place to look at.
- help should explain to you why it failed. Some business logic can be exposed here, to help you narrow the issue down.

### Example:

[](#example)

```
if (!$this->isValid($email)) {
    throw new DrWatson(
        ExceptionType::INPUT(),
        'email',
        'It seems that User provided an invalid email. Please make sure a typo was not made.',
        'input.email.invalid'
    );
}
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

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

Total

5

Last Release

2678d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/de7b71eb47dae7485aa2ee1f9442d2a9c28f448b30cb6defe2a6835f1c651848?d=identicon)[ngdo-pro](/maintainers/ngdo-pro)

---

Top Contributors

[![ngdo-pro](https://avatars.githubusercontent.com/u/22030946?v=4)](https://github.com/ngdo-pro "ngdo-pro (15 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/blacksmith-project-dr-watson/health.svg)

```
[![Health](https://phpackages.com/badges/blacksmith-project-dr-watson/health.svg)](https://phpackages.com/packages/blacksmith-project-dr-watson)
```

###  Alternatives

[sylius/refund-plugin

Plugin provides basic refunds functionality for Sylius application.

691.7M14](/packages/sylius-refund-plugin)[seboettg/citeproc-php

Full-featured CSL processor (https://citationstyles.org)

761.2M19](/packages/seboettg-citeproc-php)[timeweb/phpstan-enum

Enum class reflection extension for PHPStan

443.2M21](/packages/timeweb-phpstan-enum)[php-unit-conversion/php-unit-conversion

A fully PSR-4 compatible PHP library for converting between standard units of measure.

681.2M1](/packages/php-unit-conversion-php-unit-conversion)[open-feature/sdk

PHP implementation of the OpenFeature SDK

39514.9k15](/packages/open-feature-sdk)

PHPackages © 2026

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