PHPackages                             slash-dw/error-kit - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. slash-dw/error-kit

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

slash-dw/error-kit
==================

SlashDw structured domain error contracts and reporting hooks for Laravel

v0.0.1(1mo ago)011↓58.3%MITPHPPHP ^8.5CI passing

Since Apr 28Pushed 1mo agoCompare

[ Source](https://github.com/slash-dw/error-kit)[ Packagist](https://packagist.org/packages/slash-dw/error-kit)[ RSS](/packages/slash-dw-error-kit/feed)WikiDiscussions main Synced 1w ago

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

slash-dw/error-kit
==================

[](#slash-dwerror-kit)

A Laravel package for structured domain errors.

Requirements
------------

[](#requirements)

- PHP `^8.5`
- Laravel `^13.0`

Exact Laravel component constraints are defined in `composer.json`.

What This Package Provides
--------------------------

[](#what-this-package-provides)

- Structured domain exception contract and base class
- Report behavior enum
- Code composer (segment pack/unpack)
- In-memory error code registry
- Exception reporting policy contract and default implementation

Quick Usage
-----------

[](#quick-usage)

```
use SlashDw\ErrorKit\Domain\AbstractStructuredDomainException;
use SlashDw\ErrorKit\Enums\ReportBehavior;

final class OrderCannotBeCancelled extends AbstractStructuredDomainException
{
    public function errorCode(): int { return 1001001; }
    public function errorSlug(): string { return 'order.cannot_cancel'; }
    public function developerMessage(): string { return 'Order already shipped.'; }
    public function userMessageKey(): string { return 'orders.cannot_cancel'; }
    public function reportBehavior(): ReportBehavior { return ReportBehavior::Warning; }
}
```

Test Status
-----------

[](#test-status)

- PHPUnit: 24 tests / 40 assertions
- PHPStan: clean
- Pint: passed

Dev Commands
------------

[](#dev-commands)

```
composer install
./vendor/bin/phpunit -c phpunit.xml.dist
./vendor/bin/phpstan analyse -c phpstan.neon.dist --memory-limit=1G
./vendor/bin/pint --format agent
```

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance91

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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

42d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0541792c880c46a9d5eee49504ad45c4191d4a1c89c111a959d71268c83b61f8?d=identicon)[slash-dw](/maintainers/slash-dw)

---

Top Contributors

[![slash-dw](https://avatars.githubusercontent.com/u/279771030?v=4)](https://github.com/slash-dw "slash-dw (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/slash-dw-error-kit/health.svg)

```
[![Health](https://phpackages.com/badges/slash-dw-error-kit/health.svg)](https://phpackages.com/packages/slash-dw-error-kit)
```

###  Alternatives

[illuminate/validation

The Illuminate Validation package.

18837.7M1.6k](/packages/illuminate-validation)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2462.3M6](/packages/laravel-validation-rules-credit-card)[danielebarbaro/laravel-vat-eu-validator

A simple package that validates EU VAT numbers against the central ec.europa.eu database

41401.6k](/packages/danielebarbaro-laravel-vat-eu-validator)

PHPackages © 2026

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