sanderdlm/mandarin

GitHub-based error reporting and tracking library

Maintainers

Package info

github.com/sanderdlm/mandarin

pkg:composer/sanderdlm/mandarin

Statistics

Installs: 20

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 1

0.1.0 2025-12-15 14:57 UTC

This package is auto-updated.

Last update: 2026-06-15 12:11:33 UTC


README

GitHub-based error reporting and tracking library for PHP.

Like Sentry, but hosted on GitHub for free.

Features

  • Zero dependencies
  • Automatic GitHub issue creation for uncaught exceptions
  • Deduplication of issues using fingerprints
  • Includes code context, method parameters, and stack traces
  • Tracks occurrence counts and timestamps
  • Reopens closed issues when errors recur
  • Integrates nicely with Copilot to tackle issues

Requirements

  • PHP 8.2+
  • ext-curl

Installation

composer require sanderdlm/mandarin

Setup

Create a GitHub Personal Access Token at https://github.com/settings/tokens with repo scope.

use Mandarin\ErrorHandler;
use Mandarin\Reporter;

$reporter = new Reporter(
    token: $_ENV['GITHUB_TOKEN'],
    repository: 'owner/repo'
);

(new ErrorHandler($reporter))->register();

Example

Take a look at the first issue in this repository.