PHPackages                             redmarker/doctor - 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. redmarker/doctor

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

redmarker/doctor
================

Red Marker Health Check package

1.0.7(6y ago)14.6kPHPPHP ^7.1.3CI failing

Since Oct 3Pushed 6y ago3 watchersCompare

[ Source](https://github.com/RedMarkerTech/Doctor)[ Packagist](https://packagist.org/packages/redmarker/doctor)[ RSS](/packages/redmarker-doctor/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (7)Dependencies (4)Versions (11)Used By (0)

Red Marker Php Health Status
============================

[](#red-marker-php-health-status)

This is a php-based package for performing health status checks that follow the format found at

"I need a doctor" - Dr. Dre

Just like Dre, you might need a Doctor too.

Installation
------------

[](#installation)

```
composer require redmarker/doctor
```

Doctor Usage
------------

[](#doctor-usage)

Create an instance of a Doctor class using a new Examination().

Passing RedMarker\\Doctor\\Checks\\CheckInterface objects to the Doctor will add them to the Doctors examination attribute.

Both the releaseId and serviceId must be set on the RedMarker\\Doctor\\Doctor() .

The releaseId should be the current git commit hash.

The serviceId should be the containers id.

```
use ZendDiagnostics\Runner\Runner as Examination;

$doctor = new RedMarker\Doctor\Doctor(Examination $examination);
$doctor->setReleaseId($releaseId);
$doctor->setServiceId($serviceId);
```

Adding Checks to the Doctor
---------------------------

[](#adding-checks-to-the-doctor)

Pass each Check in an array to the Doctor.

```
$doctor->addChecks([
    new Doctor\Checks\Database()
]);

return $doctor->diagnose();
```

### Output:

[](#output)

```
{
    "status": "pass",
    "releaseID": "5113e3d0ad8fe3f1ac8393e17432353b194a060f",
    "serviceID": "34ebdffa9cba",
    "details": [
        {
            "database:connection": {
                "componentId": "api",
                "componentType": "datastore",
                "time": "2019-10-01T06:23:35.817073Z",
                "status": "pass"
            }
        }
    ]
}
```

Laravel Usage
-------------

[](#laravel-usage)

For Laravel usage the below service provider should be registered in config/app.php

```
RedMarker\Doctor\Providers\Laravel\HealthProvider::class

```

Setup configuration for Laravel Checks:

```
/*
|--------------------------------------------------------------------------
| Service Id
|--------------------------------------------------------------------------
|
| Here you may specify the service_id that should be used
| by the health check. The service_id should be the containers id.
|
*/
'service_id' => env('CONTAINER_ID', 'container-id not found'),

/*
|--------------------------------------------------------------------------
| Release Id
|--------------------------------------------------------------------------
|
| Here you may specify the release_id that should be used
| by the health check. The release_id should be the current git hash.
|
*/
'release_id' => env('RELEASE_ID', 'release-id not found'),

/*
|--------------------------------------------------------------------------
| Vendor Folder Location
|--------------------------------------------------------------------------
|
| Here you may specify the location of that vendor folder that.
| This location is only used by the VendorFolder Check.
|
*/
'vendor_folder' => env('APP_ROOT') . '/vendor',

/*
|--------------------------------------------------------------------------
| .Env File Location
|--------------------------------------------------------------------------
|
| Here you may specify the location of the .env file.
| This location is used by the EnvFile Check.
|
*/
'env_file' => env('APP_ROOT') . '/.env',

/*
|--------------------------------------------------------------------------
| HttpResponse Check configurations
|--------------------------------------------------------------------------
|
*/
'services' => [
    'component_name' => [
        'endpoint' => env('API_URL'),
        'jwt' => env('API_JWT'),
        'see_in_response' => [
            'success'
        ]
    ],
]
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 72.7% 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 ~1 days

Total

7

Last Release

2410d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2bf3d7a3628671a72e90033922ccc4f7394bfd8eaaa9e04d83456760590a233d?d=identicon)[carladermann](/maintainers/carladermann)

---

Top Contributors

[![tim-massey](https://avatars.githubusercontent.com/u/2147556?v=4)](https://github.com/tim-massey "tim-massey (8 commits)")[![CarlAdermann](https://avatars.githubusercontent.com/u/12129446?v=4)](https://github.com/CarlAdermann "CarlAdermann (2 commits)")[![chathsuom](https://avatars.githubusercontent.com/u/1393675?v=4)](https://github.com/chathsuom "chathsuom (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/redmarker-doctor/health.svg)

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

PHPackages © 2026

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