Illuminate Contracts
Laravel's package of framework interfaces defining contracts for its core services.
Repository Health
Technical Analysis
Illuminate Contracts is the package of interfaces that defines the contracts (abstractions) for Laravel’s core framework services. It collects PHP interfaces for the container, cache, queue, mail, filesystem, events, validation, routing, session, and many other subsystems into a single, dependency-light package with a PSR-4 autoloaded Illuminate\Contracts namespace.
By depending on these interfaces instead of concrete implementations, packages and applications can type-hint against stable abstractions, swap implementations, and keep coupling to the framework low. It is a read-only subtree split of the main laravel/framework repository, published so libraries can require just the contracts without pulling in the entire framework.
What You Get
- Interfaces for Laravel’s core services (container, cache, queue, mail, filesystem, events, and more)
- A single PSR-4 namespace (Illuminate\Contracts) covering every framework subsystem
- A lightweight dependency (PSR container and PSR simple-cache) usable without the full framework
- Contracts that align with the corresponding Illuminate component implementations
- A stable abstraction layer for building framework-agnostic Laravel packages
Common Use Cases
- Type-hinting against Laravel service interfaces in first- or third-party packages
- Building packages that depend on Laravel abstractions without requiring the whole framework
- Swapping or decorating concrete implementations behind their contracts
Under The Hood
Architecture - The package is a flat collection of PHP interfaces organized by subsystem directory (Container, Cache, Queue, Mail, Filesystem, Events, Validation, Routing, Session, and roughly thirty more), each declaring the public surface of a Laravel component under the Illuminate\Contracts namespace. It contains only interfaces and a few exception classes, no implementations. Tech Stack - Pure PHP (^8.3), PSR-4 autoloaded, depending only on psr/container and psr/simple-cache; it is a read-only subtree split of laravel/framework. Code Quality - As an interface-only package there is no runtime logic to test; quality shows in thorough PHPDoc, generics annotations (template/class-string), and alignment with PSR standards where applicable (the Container contract extends PSR-11). API Design - The contracts are cleanly namespaced by domain and mirror their implementations, so consumers can discover the right interface intuitively and depend on a narrow, stable abstraction.
Used by 2 apps in this directory
Firecrawl
AI Development · Developer Tools
Turn any website into clean, LLM-ready data with a single API call — no proxy headaches, no scraping complexity.
Mixpost
Marketing · Social Media
Self-host your own social media scheduler and publish to 11 platforms without subscriptions or data lock-in.