Download the PHP package pantree/pantree-php without Composer
On this page you can find all versions of the php package pantree/pantree-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pantree/pantree-php
More information about pantree/pantree-php
Files in pantree/pantree-php
Package pantree-php
Short Description PHP & Laravel SDK for Pantree — error monitoring and encrypted health reporting
License MIT
Informations about the package pantree-php
pantree/pantree-php
Official PHP & Laravel SDK for Pantree — error monitoring and encrypted health reporting.
Supports raw PHP 8.1+ and Laravel 10, 11, 12.
Requires ext-curl and ext-openssl.
Table of Contents
- Installation
- Quick Start
- Raw PHP
- Laravel
- Configuration
- Capturing Errors
- Health Reporting
- Package Layout
- API Reference
- Changelog
Installation
For Laravel, publish the config file:
Quick Start
Raw PHP
Laravel
Add your DSN to .env:
The PantreeServiceProvider is auto-discovered and wires up exception capture automatically.
No manual registration required.
Manual capture from anywhere in your app:
Configuration
DSN constructor (recommended)
Your DSN is available in Project → Settings on your Pantree dashboard:
Raw PHP:
Laravel — set env vars:
Legacy constructor (raw PHP)
Legacy env vars (Laravel)
If you don't have a DSN, the following are used instead:
Capturing Errors
captureException(Throwable $e, array $extra = [])
captureMessage(string $message, string $level = 'info', array $extra = [])
send(array $event) — Raw PHP only
Low-level method for full control over the event payload.
Event fields
| Field | Type | Description |
|---|---|---|
message |
string | Human-readable description (required) |
title |
string | Short error title / class name |
stack |
string | Stack trace |
level |
string | error / warning / info / debug |
runtime |
string | e.g. php, php-cli, laravel |
environment |
string | Deployment environment |
url |
string | $_SERVER['REQUEST_URI'] or custom |
commit |
array | ['message' => ..., 'author' => ...] |
user |
array | ['id' => ..., 'email' => ...] |
context |
array | Any additional key-value pairs |
Health Reporting
Collects OS, memory, disk, network, machine ID, container detection, and Git info — encrypted with AES-256-GCM before sending. The SDK stores the last health report timestamp and sends at most one report every 10 minutes by default, even if sendHealthReport() is called from Laravel boot() or another hot path.
Raw PHP — cron script
Crontab:
Laravel — automatic scheduler
Set PANTREE_HEALTH_REPORTING=true in .env and make sure the Laravel scheduler runs:
The service provider registers a scheduled task automatically — no manual setup needed.
Package Layout
API Reference
See docs/api-reference.md.
Changelog
See CHANGELOG.md.
License
MIT
All versions of pantree-php with dependencies
ext-curl Version *
ext-openssl Version *