Download the PHP package leafs/exception without Composer

On this page you can find all versions of the php package leafs/exception. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package exception





Leaf Crash

Total Downloads Latest Version

Errors that explain themselves. Leaf Crash turns an exception into a full story: where the code broke, what the user was doing on the way there, and a one-click briefing your AI assistant can act on.

Every framework shows you a stack trace. Leaf shows you the fifteen seconds before it.

Leaf 5 replaces the previous whoops-based handler in this package with a new engine, written from scratch. The legacy Leaf\Exception classes still ship for compatibility while leaf core migrates, but all new work happens in Leaf\Crash.

How it works

One exception becomes one Report: a plain, serializable object carrying everything a renderer or reporter could need. Nothing downstream ever touches the raw throwable.

Because the report is just data, the same crash can render as a dev page, download as JSON, replay as a cURL command, or ship to a reporting service without any of those consumers knowing about each other.

Quick start

Inside a Leaf app you won't wire this yourself: leaf core registers the hub and handler for you. The API above is what you reach for in custom setups, workers, and tests.

The user journey

Record what the app is doing as it runs. When something breaks, the trail rides along on the report, so the crash page shows the steps that led there, and each step links to the line of code that recorded it.

Recording a crumb is an array write. The trail is capped, so always-on use costs nothing worth measuring.

Checkpoints: capture without an exception

Some bugs never throw. The checkout "works" and the total is somehow zero. Capture a checkpoint and it is treated exactly like a crash: stack trace starting at your call site, journey, context, its own fingerprint for grouping.

peeks snapshots variables with hard bounds (depth, item count, string length), so a peek can never balloon a report or recurse forever.

Timing spans

The base for performance monitoring. A span costs two microtime() calls and an array write, and rides on any report captured later:

Reporters

A reporter takes the report somewhere: a log file, a webhook, Alchemy Cloud. Reporters run after the response is sent, and a reporter that throws is isolated, so reporting can never slow down or break your app.

Both are single-method interfaces (Reporter, OccurrenceStore). This package ships no storage on purpose: persistence belongs to the store you attach.

The crash page

The HTML renderer produces a single self-contained document. No CDNs, no fonts to fetch, nothing that fails when everything else is failing. It shows the stack with vendor frames collapsed, code excerpts, the user journey, request/app/user context, the caused-by chain, peeked values, and timings. Frames link straight into your editor (vscode, phpstorm, cursor, sublime, zed).

The "Open with AI" menu builds a briefing from three layers: your project's .leaf/CONTEXT.md, the user journey, and the crash itself with code, then opens it in Claude or ChatGPT, copies it as a prompt, or downloads the report as JSON. In testing, the same model that misdiagnosed a bug from a bare stack trace reconstructed the real cause from the report, citing the journey as evidence.

Security

Installing

Status

The Leaf\Crash engine is part of the Leaf 5 effort: the report core, hub, dispatcher and HTML dev page are complete and tested. The production error page, JSON/text renderers, and the leaf core wiring that retires the legacy handler are in progress. Alchemy Cloud connects through the Reporter and OccurrenceStore seams when it arrives.


All versions of exception with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package leafs/exception contains the following files

Loading the files please wait ...