PHPackages                             alexeevdv/yii2-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. alexeevdv/yii2-health

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

alexeevdv/yii2-health
=====================

Yii2 module for application health reporting

1.0.1(6y ago)18.3k↓43.5%MITPHP

Since Jul 11Pushed 6y agoCompare

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

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

yii2-health
===========

[](#yii2-health)

[![Build Status](https://camo.githubusercontent.com/55a92fe72748de1261a06a20ffd40ff83edf6e4c50d0738173f588cd08c2a7ac/68747470733a2f2f7472617669732d63692e636f6d2f616c657865657664762f796969322d6865616c74682e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/alexeevdv/yii2-health)[![codecov](https://camo.githubusercontent.com/aeb172882139446a40dd29c0ef531a97c26d40ac0bf7f5bd8263efa7d24e8c05/68747470733a2f2f636f6465636f762e696f2f67682f616c657865657664762f796969322d6865616c74682f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/alexeevdv/yii2-health)[![PHP 7.1](https://camo.githubusercontent.com/89830e985e0a7f5f1ed58d412d81ee5bdccafb5dd5861eb9a6e63e44dde568b6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e312d677265656e2e737667)](https://camo.githubusercontent.com/89830e985e0a7f5f1ed58d412d81ee5bdccafb5dd5861eb9a6e63e44dde568b6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e312d677265656e2e737667)[![PHP 7.2](https://camo.githubusercontent.com/047bbe011ab372b4d00fc7ab0ed6f0d2a3db1ffda3a25de65f318dac100328ba/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e322d677265656e2e737667)](https://camo.githubusercontent.com/047bbe011ab372b4d00fc7ab0ed6f0d2a3db1ffda3a25de65f318dac100328ba/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e322d677265656e2e737667)[![PHP 7.3](https://camo.githubusercontent.com/ebdf47db6e91607cc8e1a8ea16f4a35122a068c1e3a23b9eb6c9932d602d28ff/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e332d677265656e2e737667)](https://camo.githubusercontent.com/ebdf47db6e91607cc8e1a8ea16f4a35122a068c1e3a23b9eb6c9932d602d28ff/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e332d677265656e2e737667)

Yii2 module for application health status reporting

Installation:
-------------

[](#installation)

The preferred way to install this extension is through [composer](https://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist alexeevdv/yii2-health "^1.0"

```

or add

```
"alexeevdv/yii2-health": "^1.0"

```

to the require section of your composer.json.

Configuration:
--------------

[](#configuration)

```
//...
    'modules' => [
        'health' => [
            'class' => alexeevdv\yii\health\Module::class,
            'components' => [
                'database' => alexeevdv\yii\health\components\Database::class,
                'queue' => [
                    'class' => alexeevdv\yii\health\components\Queue::class,
                    'failoverTimeout' => 600, // default is 300
                ],
            ],
        ],
    ],
    'components' => [
        // ...
            'queue' => [
                // Add this to enable last executed job timestamp logging
                'as health' => alexeevdv\yii\health\behaviors\QueueBehavior::class,
            ],
            'urlManager' => [
                'rules' => [
                    // Add url rule to access health status report
                    'api/v1/health' => '/health',
                ],
            ],
        // ...

    ],
//...
```

Usage:
------

[](#usage)

```
$ curl http://localhost/api/v1/health
{
    "status": "warn",
    "checks": {
        "database": [
            {
                "type": "datastore",
                "status": "pass",
                "time": "2019-07-09T07:32:10+0000",
                "output": ""
            }
        ],
        "queue": [
            {
                "type": "component",
                "status": "warn",
                "time": "2019-07-09T07:32:10+0000",
                "output": "No jobs were executed yet"
            }
        ]
    }
}

```

Supported components:
---------------------

[](#supported-components)

- Database

    Class: [alexeevdv\\yii\\health\\components\\Database](src/components/Database.php)

    Params:

    - `db` - Database component configuration
- Queue

    Class: [alexeevdv\\yii\\health\\components\\Queue](src/components/Queue.php)

    Params:

    - `cache` - Cache component configuration
    - `lastExecutedJobCacheKey` - Cache key for last executed job timestamp
    - `failoverTimeout` - Second from last executed job for queue to be reported as failed

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Total

2

Last Release

2380d ago

### Community

Maintainers

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

---

Top Contributors

[![alexeevdv](https://avatars.githubusercontent.com/u/597839?v=4)](https://github.com/alexeevdv "alexeevdv (5 commits)")

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/alexeevdv-yii2-health/health.svg)

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

###  Alternatives

[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)

PHPackages © 2026

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