定制 silencenjoyer/silence-error-handling 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

silencenjoyer/silence-error-handling

最新稳定版本:0.0.3

Composer 安装命令:

composer require silencenjoyer/silence-error-handling

包简介

Silence error handling system.

README 文档

README

Latest Stable Version PHP Version Require License

The package is designed for centralised processing of errors and exceptions. It provides a readable view of errors.

Base Template Example

This package is part of the monorepository silencenjoyer/silence, but can be used independently.

⚙️ Installation

composer require silencenjoyer/silence-error-handling

🚀 Quick start

<?php

use Silence\ErrorHandler\ErrorHandler;
use Silence\ErrorHandler\Renderers\HtmlRenderer;

$errorHandler = new ErrorHandler(new HtmlRenderer());
$errorHandler->register();

🧱 Features:

  • Interception of unhandled exceptions, compatible with PSR-15 middleware.
  • Memory reserve to Avoid "Out of Memory" lockups
  • Dynamic memory reserve adjustment
  • Graceful fallback - When in non-debug mode, hides internal details.
  • Detailed trace - When debug mode is enabled, provides full details.
  • Shutdown error capture
  • Unified rendering

🧪 Testing

php vendor/bin/phpunit

🧩 Use in the composition of Silence

The package is used to intercept errors in the Silence application.
If you are writing your own package, you can connect silencenjoyer/silence-error-handling for the same reason.

📄 License

This package is distributed under the MIT licence. For more details, see LICENSE.

统计信息

  • 总下载量: 10
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-18