sanderdlm / mandarin
GitHub-based error reporting and tracking library
0.1.0
2025-12-15 14:57 UTC
Requires
- php: ^8.2
- ext-curl: *
Requires (Dev)
- phpstan/phpstan: ^1.9
- phpunit/phpunit: ^10.5
- squizlabs/php_codesniffer: ^3.8
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.