PHPackages                             153264/think-health - 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. 153264/think-health

ActiveModule

153264/think-health
===================

Health check for ThinkPHP

V1.2.0(8mo ago)333MITPHPPHP &gt;=8.2.0CI passing

Since Aug 4Pushed 8mo agoCompare

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

READMEChangelog (10)Dependencies (3)Versions (11)Used By (0)

[ThinkHealth](https://153264.github.io/think-health/)
=====================================================

[](#thinkhealth)

📦 一个为 [ThinkPHP](https://github.com/top-think/think) 框架设计的健康检查库，支持自定义健康检查和灵活的配置选项。

[![Lint Status](https://github.com/153264/think-health/workflows/Lint/badge.svg)](https://github.com/153264/think-health/actions)[![Latest Stable Version](https://camo.githubusercontent.com/ecfbe5c7d85359582635897e0ff67af738740ff0294984406699fe7c24f74c12/68747470733a2f2f706f7365722e707567782e6f72672f3135333236342f7468696e6b2d6865616c74682f762f737461626c652e737667)](https://packagist.org/packages/153264/think-health)[![Latest Unstable Version](https://camo.githubusercontent.com/6d333315387612b34d0fafb0fb569dafcedcdda4e251afc105c24163c6828f95/68747470733a2f2f706f7365722e707567782e6f72672f3135333236342f7468696e6b2d6865616c74682f762f756e737461626c652e737667)](https://packagist.org/packages/153264/think-health)[![Total Downloads](https://camo.githubusercontent.com/773e312596196cc4860f6ee20eff1b738083db56e1a01b72911f351ae7e1b69e/68747470733a2f2f706f7365722e707567782e6f72672f3135333236342f7468696e6b2d6865616c74682f646f776e6c6f616473)](https://packagist.org/packages/153264/think-health)[![License](https://camo.githubusercontent.com/902db9c85086080ad36d570ad08ded59db2559dc12e99575c397f08dfc820d9f/68747470733a2f2f706f7365722e707567782e6f72672f3135333236342f7468696e6b2d6865616c74682f6c6963656e7365)](https://packagist.org/packages/153264/think-health)

功能特性
----

[](#功能特性)

- 简单易用的健康检查接口
- 可自定义的健康检查
- 灵活的配置选项
- 支持使用命令行定时上报健康情况

环境需求
----

[](#环境需求)

- PHP &gt;= 8.2.0
- [Composer](https://getcomposer.org/) &gt;= 2.0

安装
--

[](#安装)

```
composer require 153264/think-health
```

使用示例
----

[](#使用示例)

安装后，健康检查接口会自动注册到你的应用中。 默认情况下，你可以通过访问 `/health` 路径来进行健康检查：

```
curl http://your-domian/your-entrance/health
```

### 服务正常

[](#服务正常)

```
HTTP/1.1 200 OK
Content-Type: text/html

ok

```

### 服务异常

[](#服务异常)

```
HTTP/1.1 500 Internal Server Error
Content-Type: text/html

error

```

也可以通过命令行 `health:check` 进行健康检查。 默认不进行上报，如果需要上报可以使用 `--report` 选项

```
php think health:check

+--------------------------------------------+--------------------------------------------------------------------------------------------+
| Name                                       | Message                                                                                    |
+--------------------------------------------+--------------------------------------------------------------------------------------------+
| CheckDataBase                              | SQLSTATE[HY000] [1045] Access denied for user 'username'@'localhost' (using password: YES) |
| CheckCache                                 | ok                                                                                         |
| CheckEnv                                   | APP_DEBUG is not falsy                                                                     |
| CheckFolder                                | ok                                                                                         |
| CheckHttp https://your-server.com/resource | request failed with status code: 0                                                         |
+--------------------------------------------+--------------------------------------------------------------------------------------------+
```

文档和链接
-----

[](#文档和链接)

[官网](https://153264.github.io/think-health/) · [更新策略](https://github.com/153264/think-health/security/policy)

License
-------

[](#license)

MIT

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance58

Moderate activity, may be stable

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 ~2 days

Total

10

Last Release

267d ago

### Community

Maintainers

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

---

Top Contributors

[![153264](https://avatars.githubusercontent.com/u/36463512?v=4)](https://github.com/153264 "153264 (41 commits)")

---

Tags

healththinkphpthinkphp8healththinkphp

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[topthink/think

the new thinkphp framework

8.0k1.2M13](/packages/topthink-think)[zhongshaofa/easyadmin

基于ThinkPHP6.0和layui的快速开发的后台管理系统。

6609.3k](/packages/zhongshaofa-easyadmin)[casbin/think-authz

An authorization library that supports access control models like ACL, RBAC, ABAC for ThinkPHP.

27918.5k6](/packages/casbin-think-authz)[naixiaoxin/think-wechat

EasyWechat For Thnkphp5.1+

27316.1k1](/packages/naixiaoxin-think-wechat)[liliuwei/thinkphp-jump

适用于thinkphp6.0的跳转扩展

2874.4k1](/packages/liliuwei-thinkphp-jump)[xiaodi/think-pullword

ThinkPHP 分词/抽词 扩展包

5512.1k](/packages/xiaodi-think-pullword)

PHPackages © 2026

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