PHPackages                             heimdall/heimdall - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. heimdall/heimdall

ActiveLibrary

heimdall/heimdall
=================

Heimdall - error alerts to Discord/Slack via webhooks

00PHP

Since Mar 1Pushed 2mo agoCompare

[ Source](https://github.com/machii28/heimdall-php)[ Packagist](https://packagist.org/packages/heimdall/heimdall)[ RSS](/packages/heimdall-heimdall/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

heimdall/heimdall (PHP)
=======================

[](#heimdallheimdall-php)

Heimdall is a lightweight, framework-agnostic error reporting client that sends alerts to Discord and Slack via incoming webhooks.

It is designed to:

- Work in plain PHP
- Work in any framework
- Be safe (never throw while reporting)
- Be cross-language compatible (shared event schema in `/spec/event.schema.json`)
- Be opt-in (not forced into your logging pipeline)

---

Installation
============

[](#installation)

```
composer require heimdall/heimdall
```

---

Quick Start (Plain PHP)
=======================

[](#quick-start-plain-php)

```
use Heimdall\Heimdall;
use Heimdall\HeimdallReporter;
use Heimdall\Http\CurlHttpClient;
use Heimdall\Transport\DiscordWebhookTransport;
use Heimdall\Transport\SlackWebhookTransport;
use Heimdall\Format\DefaultFormatter;
use Heimdall\Context\PhpGlobalsContextProvider;

$http = new CurlHttpClient();
$fmt  = new DefaultFormatter();

$heimdall = new Heimdall(
    service: 'my-api',
    environment: 'prod',
    version: '1.0.0',
    transports: [
        new DiscordWebhookTransport($http, $fmt, getenv('DISCORD_WEBHOOK')),
        new SlackWebhookTransport($http, $fmt, getenv('SLACK_WEBHOOK')),
    ]
);

$reporter = new HeimdallReporter(
    heimdall: $heimdall,
    contextProvider: new PhpGlobalsContextProvider(),
    defaultTags: ['service' => 'my-api']
);

try {
    throw new RuntimeException("Boom");
} catch (Throwable $e) {
    $reporter->exception(
        $e,
        extra: ['order_id' => 123],
        tags: ['component' => 'checkout']
    );
}
```

---

Sending Messages Without Exceptions
===================================

[](#sending-messages-without-exceptions)

```
$reporter->message(
    message: 'Checkout latency high',
    extra: ['p95_ms' => 1200],
    tags: ['component' => 'checkout'],
    level: 'warning'
);
```

---

Laravel
=======

[](#laravel)

Heimdall integrates cleanly with Laravel using an opt-in standalone service.

See:

docs/laravel.md

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance57

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/091d6999a18b4fb6f7a884dca9f840f30cdd50c93f63b67f703300d5acb4768e?d=identicon)[machii28](/maintainers/machii28)

---

Top Contributors

[![machii28](https://avatars.githubusercontent.com/u/11863084?v=4)](https://github.com/machii28 "machii28 (1 commits)")

### Embed Badge

![Health badge](/badges/heimdall-heimdall/health.svg)

```
[![Health](https://phpackages.com/badges/heimdall-heimdall/health.svg)](https://phpackages.com/packages/heimdall-heimdall)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
