PHPackages                             leankoala/healthfoundation - 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. [Framework](/categories/framework)
4. /
5. leankoala/healthfoundation

ActiveLibrary[Framework](/categories/framework)

leankoala/healthfoundation
==========================

A expendable health check framework for PHP

1.0.0(5y ago)1010.0k4[1 issues](https://github.com/Leankoala/HealthFoundation/issues)[1 PRs](https://github.com/Leankoala/HealthFoundation/pulls)1MITPHPPHP &gt;=7.0.0CI failing

Since Feb 16Pushed 4y ago4 watchersCompare

[ Source](https://github.com/Leankoala/HealthFoundation)[ Packagist](https://packagist.org/packages/leankoala/healthfoundation)[ RSS](/packages/leankoala-healthfoundation/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (5)Versions (4)Used By (1)

HealthFoundation
================

[](#healthfoundation)

The HealthCheckFoundation is an open source library that should make it easy to provide continuous health statuses for all important components in web projects. It was designed to be very extensible.

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0d922d3062c4d2b9fcb5f3a3848f1e3449654d9c035c2f5e277bcec130eeddff/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4c65616e6b6f616c612f4865616c7468466f756e646174696f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Leankoala/HealthFoundation/?branch=master)

Using HealthFoundation
----------------------

[](#using-healthfoundation)

HealthFoundation was designed to be run standalone or within any project.

### Example

[](#example)

#### Config file

[](#config-file)

This example checks if the disc space is used is less than 95 percent.

```
$ php bin/health.php run health.yml
```

The config file `health.yml` could look like this

```
format:
  class: Leankoala\HealthFoundation\Result\Format\Ietf\IetfFormat
  parameters:
    passedMessage: "Storage server is up and running."
    failureMessage: "Some problems occurred on storage server."

checks:
  spaceUsed:
    check: Leankoala\HealthFoundation\Check\Device\SpaceUsedCheck
    identifier: space_used_check
    description: 'Space used on storage server'
    parameters:
      maxUsageInPercent: 95
```

For more information on how to use this have a look at the `RunCommand`.

#### Code

[](#code)

The same check as code

```
# health.php

include_once __DIR__ . '/../vendor/autoload.php';

$foundation = new \Leankoala\HealthFoundation\HealthFoundation();

// max disc usage 95%
$spaceUsedCheck = new \Leankoala\HealthFoundation\Check\Device\SpaceUsedCheck();
$spaceUsedCheck->init(95);

$foundation->registerCheck(
    $spaceUsedCheck,
    'space_used_check',
    'Space used on storage server');

$runResult = $foundation->runHealthCheck();

$formatter = new \Leankoala\HealthFoundation\Result\Format\Ietf\IetfFormat(
    'Storage server is up and running.',
    'Some problems occurred on storage server.'
);

$formatter->handle(
    $runResult
);
```

### Checks

[](#checks)

### Formatter

[](#formatter)

It is possible to produce any kind of health check format. At the moment the IETF standard ([Health Check Response Format for HTTP APIs](https://datatracker.ietf.org/doc/draft-inadarei-api-health-check/?include_text=1)) is supported but there is an simple interface that can be implemented to create new formats.

Status
------

[](#status)

### Implemented health checks

[](#implemented-health-checks)

As this is an open source project we want everybody to submit their own checks, that is why we provide the main author of every check in this list.

- Basic
    - Number
        - **LessThan** ()
- Database
    - MySQL
        - Slave
            - **SlaveStatusField** ()
        - **MysqlRunning** ()
    - Redis
        - **ListLength** ()
- Device
    - **SpaceUsed** ()
    - **Uptime** ()
- Docker
    - Container
        - **ContainerIsRunningCheck** ()
- Files
    - Content
        - **NumberOfLines** ()
    - **FileCreatedAfter** ()
    - **FileExists** ()
- Resource
    - HTTP
        - **StatusCode** ()
- System
    - **Uptime** ()
    - **NumberProcesses** ()

### Ideas for health checks

[](#ideas-for-health-checks)

- Database
    - MySQL
        - **NumberOfReturnedElements**
    - Redis
        - **isRunning**
- Files
    - **isWritable**
    - **FileEditedAfter**
- Tool
    - Wordpress
        - Plugins
            - **NumberOfOutdatedPlugins**
        - **isOutdated**
        - **isInsecure**

Outlook / Ideas
---------------

[](#outlook--ideas)

- **Suggestions** - the tool should find on its own what can be tested
- **Plugins** - It would be great if there where plugins/bundles for WordPress, Shopware, Symfony etc.
- **History** - Remember the last health status
- **Action** - Do something after a health check fails

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.2% 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

Unknown

Total

1

Last Release

1908d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/484ac8fdab8874b46d6890cba143e75f6ed5369749d35c76a8ca87fa5857ebc0?d=identicon)[phmLabs](/maintainers/phmLabs)

---

Top Contributors

[![phmLabs](https://avatars.githubusercontent.com/u/650537?v=4)](https://github.com/phmLabs "phmLabs (100 commits)")[![HeHof](https://avatars.githubusercontent.com/u/2856767?v=4)](https://github.com/HeHof "HeHof (3 commits)")[![Leankoala](https://avatars.githubusercontent.com/u/34853295?v=4)](https://github.com/Leankoala "Leankoala (1 commits)")

### Embed Badge

![Health badge](/badges/leankoala-healthfoundation/health.svg)

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

###  Alternatives

[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19664.8M1.6k](/packages/drupal-core)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6941.5M398](/packages/drupal-core-recommended)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M526](/packages/shopware-core)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9417.2k58](/packages/open-dxp-opendxp)

PHPackages © 2026

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