jeckel-lab/advanced-types
Advanced Types is a Laravel/PHP package for modelling domain values with reusable, type-safe objects and casts. It replaces loose primitives with expressive types, improving validation and clarity. Building blocks for custom value objects and Eloquent casts keep domain logic consistent and testable.
jeckel-lab/contract means the error vocabulary is now a shared, versioned contract — a deliberate "buy/borrow once, enforce everywhere" decision rather than per-team convention.Consider adoption when:
Look elsewhere when:
HttpException and validation exceptions already cover the surface area; the abstraction cost outweighs the benefit.Adoption criteria to gate on: pinned version in composer.json, a test asserting your boundary translation from DomainException to HTTP/problem-details responses, and a documented upgrade path for each 0.x bump.
Executives: A small, low-cost dependency that standardizes how failures are represented across our Laravel services, so errors stay consistent as we split modules and expose APIs. The trade-off is maturity: the package is pre-1.0 and its 0.3.1 "patch" changes exception types in a way that can break callers, so we should adopt it deliberately with pinned versions rather than treat it as settled infrastructure.
Engineering: 0.3.1 relocates every exception into jeckel-lab/contract, makes them immutable, and enforces that only the contract's DomainException is thrown. Practically: add the contract dependency, catch DomainException at your boundaries instead of concrete classes, translate once to HTTP/problem-details responses, and treat the release as breaking despite the patch number. Upside is a clean, framework-free error contract and immutable failures that are safe to log and serialize; cost is that any catch blocks referencing old exception classes must be migrated now, and we should expect more churn before 1.0.
How can I help you explore Laravel packages today?