integer-net / magento2-health-check
integer-net/magento2-health-check
Magento 2 Health Check
Magento 2 Healthcheck
Installation
Using composer
When this package is installed into a Magento 2 project (with the default magento/magento-composer-installer plugin present), it will auto install the required files into the pub/ directory of Magento 2
composer require integer-net/magento2-health-check
Manual
Copy the file src/health_check.php into your Magento 2 directory into pub/ (replace the original health_check.php from Magento 2)
Configuration
The health check can be configured by creating the file pub/check/config.php. All configuration options can be found in the provided default configuration, which will be installed into pub/check/config.dist.php.
When a config.php is present, it will be loaded instead of the config.dist.php.
The contents of the file should look like this:
<?php
declare(strict_types=1);
use IntegerNet\Healthcheck\Configuration;
return (new Configuration)
// Default timezone: Europe/Berlin
// ->setTimezone('Antarctica/Troll')
// Default output format: Configuration::FORMAT_PLAIN
// Available output formats: Configuration::FORMAT_JSON & Configuration::FORMAT_PLAIN
// ->setOutputFormat(Configuration::FORMAT_JSON)
->testProductionMode(/* enabled: true */)
->testDatabaseConnections(/* enabled: true, connections: ['default', 'erp'] */)
->testCacheAvailability(/* enabled: true, caches: ['configuration', 'full_page'] */)
->testIndexerTriggersExist(/* enabled: true, indexers: ['catalogsearch_fulltext', 'catalogrule_rule'] */)
->testCronjobsAreRunning(/* enabled: true, */ groups: [
['group' => 'index', 'maxOffset' => 5], // 'maxOffset' in minutes since last run
['group' => 'default', 'maxOffset' => 5],
['group' => 'consumers', 'maxOffset' => 5],
])
;
See config.dist.php for a list of all possible configurations and their parameters
Output format
Allowed formats: plain, json
The default output format can be changed by using the method setOutputFormat in the configuration file (pub/check/config.php) or by setting the environment variable HEALTHCHECK_OUTPUT_FORMAT.
Example usage:
HEALTHCHECK_OUTPUT_FORMAT=plain php pub/health_check.php
Supported checks
- Production mode is set
- Database availability
- Cache backend availability (if backend is not 'file')
- Indexer triggers exist in database
- Cronjobs are running (per group)
- Search backend/engine availability
- Queue backend availability (if amqp is used)
No changelog yet
The vendor hasn't published a changelog. Tagged releases appear in the Versions tab.
| Version | Stability | QA Status | Compatibility | Released |
|---|---|---|---|---|
| 1.1.0 | stable | Fail | Magento 2.4.7-2.4.8 Details | 2025-11-18 00:15:54 |
| 1.0.0-rc2 | RC | Not tested | Not yet tested Details | 2025-06-26 09:49:11 |
| 1.0.0 | stable | Not tested | Not yet tested Details | 2025-06-26 09:49:11 |
| 1.0.0-rc1 | RC | Not tested | Not yet tested Details | 2025-06-26 07:38:27 |
Requires 2
| Package | Constraint |
|---|---|
| php | ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 |
| magento/magento-composer-installer | * |
Requires-dev 1
| Package | Constraint |
|---|---|
| ergebnis/composer-normalize | * |
Compatibility
Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.
Code Quality
Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge — a phpcs finding can't make a module incompatible.
Static analysis
Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.
PHPStan
Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases. Cell → details modal.
Tests
Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.
Unit tests
| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | ||
| 2.4.8 | N/A | N/A | ||
| 2.4.9 | N/A | N/A |
Integration tests
| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | ||
| 2.4.8 | N/A | N/A | ||
| 2.4.9 | N/A | N/A |
Security
Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.
More from integer-net
View vendorGenerate RewriteMap files for Apache from Magento URL rewrites
Create an "is_sale" product attribute and update it automatically from the "price" and "special_price" attributes
N/A
Turn an existing module into recurring revenue.
If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.