PHPackages                             soooldier/hyperf-whoops - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. soooldier/hyperf-whoops

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

soooldier/hyperf-whoops
=======================

A whoops component for hyperf.

v1.0.1(6y ago)843MITPHPPHP &gt;=7.2

Since Jul 3Pushed 6y agoCompare

[ Source](https://github.com/soooldier/hyperf-whoops)[ Packagist](https://packagist.org/packages/soooldier/hyperf-whoops)[ RSS](/packages/soooldier-hyperf-whoops/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

hyperf-whoops
=============

[](#hyperf-whoops)

让hyperf支持whoops显示异常信息

Features
========

[](#features)

- 开箱即用

How to use
==========

[](#how-to-use)

```
composer require soooldier/hyperf-whoops
```

Api
===

[](#api)

- [hyperf-whoops](#hyperf-whoops)
- [Features](#Features)
- [How to use](#How-to-use)
- [Api](#Api)
- [Contents](#Contents)
    - [getHtmlOutput](#getHtmlOutput)
    - [getPlainTextOutput](#getPlainTextOutput)
    - [getJsonOutput](#getJsonOutput)
- [Example](#Example)
- [ChangeLog](#ChangeLog)

Contents
========

[](#contents)

getHtmlOutput
-------------

[](#gethtmloutput)

`$whoops->getHtmlOutput()`

getPlainTextOutput
------------------

[](#getplaintextoutput)

`$whoops->getPlainTextOutput()`

getJsonOutput
-------------

[](#getjsonoutput)

`$whoops->getJsonOutput()`

Example
=======

[](#example)

```
class AppExceptionHandler extends ExceptionHandler
{
    /**
     * @var ContainerInterface
     */
    private $container;

    /**
     * @var StdoutLoggerInterface
     */
    private $logger;

    public function __construct(StdoutLoggerInterface $logger, ContainerInterface $container)
    {
        $this->logger = $logger;
        $this->container = $container;
    }

    public function handle(Throwable $throwable, ResponseInterface $response)
    {
        $whoops = $this->container->get('whoops');
        $content = $whoops->getHtmlOutput($throwable); // 获取html格式输出，日志最详细
        // $content = $whoops->getJsonOutput($throwable); // 获取json格式输出，通常配合ajax使用
        // $content = $whoops->getPlainTextOutput($throwable); // 文本格式输出，通常记日志
        return $response->withStatus(500)->withBody(new SwooleStream($content));
    }

    public function isValid(Throwable $throwable): bool
    {
        return true;
    }
}
```

ChangeLog
=========

[](#changelog)

- v1.0.0 第一版
- v1.0.1 修复相同协程内数据污染问题

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2507d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e03857f5e1736714afa9b25e4025cbe81224efc7f7517c8f0c82f7b4b687d6a0?d=identicon)[soooldier](/maintainers/soooldier)

---

Top Contributors

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

---

Tags

hyperfphpwhoopshyperf

### Embed Badge

![Health badge](/badges/soooldier-hyperf-whoops/health.svg)

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

###  Alternatives

[xiaodi/think-whoops

A debug service for ThinkPHP.

413.5k1](/packages/xiaodi-think-whoops)[limingxinleo/hyperf-utils

Utils for Hyperf.

29133.9k3](/packages/limingxinleo-hyperf-utils)[gourmet/whoops

Whoops for CakePHP 3

2438.0k1](/packages/gourmet-whoops)[dereuromark/cakephp-whoops

Whoops error handler for CakePHP

1492.4k1](/packages/dereuromark-cakephp-whoops)

PHPackages © 2026

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