Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Ignition Contracts

Ignition Contracts Laravel Package

spatie/ignition-contracts

Contracts for spatie/ignition that define interfaces for building custom error pages. Provides shared abstractions so solutions can integrate with Ignition’s error reporting and rendering workflow.

View on GitHub
Deep Wiki
Context7

Solution contracts for Ignition

Frequently asked questions about Ignition Contracts
What is spatie/ignition-contracts used for?
It provides the PHP interfaces and one abstract base class that Ignition uses to render actionable error page solutions in Laravel. The package includes contracts such as Solution, RunnableSolution, and HasSolutionsForThrowable plus repository interfaces. It contains no service provider, configuration, or runtime logic, so it only matters when you build or consume custom solutions.
Do I need to install spatie/ignition-contracts in a Laravel app?
Usually no. Most apps get the contracts transitively through Ignition or facade/ignition, and Laravel 9+ apps should target the contracts bundled in spatie/ignition instead. Add it directly only if you are deliberately authoring custom solution providers or publishing a package that contributes solutions.
How do I install spatie/ignition-contracts with Composer?
Run composer require spatie/ignition-contracts if you have a specific need for the standalone contracts. Installation is instantaneous because the package has no dependencies, service provider, or configuration. In most Laravel projects this should be a dev-only or transitive dependency rather than a production requirement.
Which Laravel and PHP versions does spatie/ignition-contracts support?
The package declares PHP ^7.1|^8.0 and is not tied to a specific Laravel version because it is interface-only. Real compatibility depends on the Ignition major version in your app and whether it already bundles equivalent contracts. PHP 8.3 and 8.4 hardening will not come from this package.
How do I create a custom Ignition solution using these contracts?
Implement Solution or extend BaseSolution for a descriptive solution, and implement RunnableSolution if the fix should be executable. Implement HasSolutionsForThrowable when you want to contribute solutions for specific exception types. For new code, type against the Spatie Ignition Contracts namespace so your classes survive the move away from the standalone package.
Is spatie/ignition-contracts deprecated or replaced by spatie/ignition?
The contracts have been folded into Ignition under the Spatie Ignition Contracts and NunoMaduro Ignition Contracts namespaces, so the standalone package has a known expiry date for most teams. It is best treated as a legacy or containment item rather than a new adoption. Laravel 9+ projects should use the contracts shipped with spatie/ignition.
What is the difference between Solution and RunnableSolution?
Solution defines a descriptive fix that Ignition can show on an error page, while RunnableSolution represents a solution that can also be run. Use the simpler contract when you only need to explain a fix, such as a configuration change or a link to documentation. Use RunnableSolution only when there is a safe executable action to offer.
Does spatie/ignition-contracts affect production error handling?
No. It is a contract boundary for local and staging debugging affordances and has no bearing on production request handling, queue workers, or API contracts. Custom solutions should be limited to development and debugging workflows. The package itself adds no runtime service provider or storage.
How should I test custom solutions built with Ignition contracts?
Because the package is interface-only, you can unit test your solution classes with plain PHPUnit and assert they satisfy the expected contracts. Add an integration check in a local or staging Laravel app to confirm the solution actually renders through Ignition. Watch for interface naming differences across Ignition releases, since a class can satisfy one contract and silently fail to render under another.
Why does spatie/ignition-contracts show zero dependents?
The reported zero dependents likely reflects a dataset artifact or incomplete inventory rather than real usage, especially given expected use in Laravel 8-era facade/ignition trees. Verify with composer why spatie/ignition-contracts and your SBOM before making inventory decisions. For new code, prefer the contracts bundled with spatie/ignition.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console