Download the PHP package temant-framework/temant-fault without Composer
On this page you can find all versions of the php package temant-framework/temant-fault. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download temant-framework/temant-fault
More information about temant-framework/temant-fault
Files in temant-framework/temant-fault
Package temant-fault
Short Description A modern, feature-rich exception handler for PHP with HTML, JSON, XML, and plain text rendering. Part of the Temant Framework.
License MIT
Homepage https://github.com/temant-framework/temant-fault
Informations about the package temant-fault
Temant Fault
A modern, feature-rich exception handler for PHP.
Fault is an exception handler that catches uncaught exceptions and PHP errors, then renders beautiful, information-rich error pages. It supports HTML, JSON, XML, and plain text output with automatic content negotiation. Part of the Temant Framework.
Features
- Interactive HTML error page with syntax-highlighted source code
- Stack trace sidebar with frame filtering and keyboard navigation
- Tabbed debug panels: Request, Environment, Session, Cookies, Logs, Git, Xdebug
- JSON, XML, and plain text renderers for APIs and CLI
- Automatic content negotiation via HTTP Accept header
- Light/dark theme with localStorage persistence
- "Open in editor" links (PHPStorm, VS Code, Sublime, Atom, IntelliJ, NetBeans)
- Sensitive data masking (passwords, API keys, tokens)
- Exception chain support with full previous-exception rendering
- Listener callbacks for logging and external error reporting
- Production mode with safe, detail-free error pages
- PHPStan level 9 strict typing
Requirements
- PHP 8.2 or higher
- Extensions:
json,mbstring,xmlwriter
Installation
Quick Start
Usage
Basic Setup
Production Mode
In production, disable debug mode to show a safe, generic error page:
Editor Integration
Configure clickable "Open in editor" links for your IDE:
Listener Callbacks
Add listeners to log or report exceptions before rendering:
Custom Renderers
Replace any built-in renderer with your own:
Programmatic Rendering
Render exceptions without outputting them:
Default Content Type
Change the fallback format when content negotiation has no match:
Renderers
| Renderer | Content Type | Debug Output | Production Output |
|---|---|---|---|
HtmlRenderer |
text/html |
Interactive debug page | Minimal 500 page |
JsonRenderer |
application/json |
Full error JSON | {"error": {"message": "Internal Server Error"}} |
XmlRenderer |
application/xml |
Full error XML | <error><message>Internal Server Error</message></error> |
PlainTextRenderer |
text/plain |
Stack trace text | Internal Server Error |
Keyboard Shortcuts (HTML Renderer)
| Key | Action |
|---|---|
j / k or Arrow keys |
Navigate stack frames |
/ |
Focus frame search |
t |
Toggle light/dark theme |
c |
Copy error to clipboard |
Development
Project Structure
License
Fault is open-source software licensed under the MIT License.
Part of the Temant Framework.
All versions of temant-fault with dependencies
ext-json Version *
ext-mbstring Version *
ext-xmlwriter Version *