dragon-code/contracts
Dragon Code Contracts provides a set of reusable PHP interfaces for any project, helping standardize implementations and keep code decoupled. Lightweight, framework-agnostic, and easy to install via Composer.
Cache\Store, Cache\Ttl), queues (ShouldQueue, ShouldBeUnique), DTO conversion (Dtoable), HTTP domain helpers (Http\Builder), actions, and migrations are low-differentiation work. This package is a candidate to skip writing them ourselves — but see the archived-status caveat below before committing.Reasonable to evaluate when:
dragon-code/helpers) and want type compatibility with Dtoable and friends.Look elsewhere when:
For executives — the honest one-paragraph version: This is a small, MIT-licensed library of PHP interfaces for the repetitive parts of our Laravel stack — caching, queues, data transfer, HTTP helpers. Its value is consistency and speed, not capability: it saves us from writing and re-litigating the same interfaces in every service, and it makes components swappable and testable. Two caveats belong in the same breath. First, it adds no runtime behavior — it is type definitions only, so there is no performance cost and no new failure mode. Second, the project is archived and has essentially no external adoption, which means the moment we adopt it we should be prepared to own a fork. Recommendation: adopt the pattern, and only take the dependency if engineering accepts a named owner and a pinned version. I would not present this as a cost-saving initiative with an attached percentage; the benefit is developer time and architectural coherence, and it should be justified on that basis.
For engineering and architecture leads: The package gives us pre-written, framework-current interfaces for the concerns we keep re-implementing: Cache\Store and Cache\Ttl (including rememberForever and doesntHave semantics), Queue\ShouldQueue and ShouldBeUnique, Dtoable for serialization-agnostic DTOs, Http\Builder domain helpers, plus action and migration contracts. That supports dependency inversion, makes cache/queue/HTTP collaborators straightforward to fake in tests, and gives cross-team packages a shared vocabulary instead of three subtly different CacheInterface definitions. The counterarguments are concrete: the repo is archived, so Laravel 13 compatibility is on us; there are no dependents to lean on for battle-testing; and the API surface has historically moved in small increments, so pin the version and review changelogs on upgrade. Suggested path: vendor the interfaces we actually use into an internal platform/contracts package (MIT permits this), keep the names close to upstream so we can re-sync if the project revives, and use the upstream repository as design input rather than a live dependency. That captures the standardization benefit, removes the single-maintainer risk from our critical path, and leaves the door open either way.
How can I help you explore Laravel packages today?