This package is abandoned and no longer maintained. No replacement package was suggested.

OPG Core Health Check ZF2 Module

1.0.1 2015-06-15 16:10 UTC

This package is not auto-updated.

Last update: 2020-01-17 21:03:27 UTC


This module provides zend services related to checking the health of the other opg core applications, specifically opg-core-back-end, opg-core-front-end and opg-core-auth-membrane


  1. Install this module as a dependency on your zf2 project via Composer. If you don't have composer then follow the steps to download it from their site:
  2. register module with your application

Your composer.json should look something like this

    "repositories": [
            "type": "vcs",
            "url": ""
    "require": {
        "ministryofjustice/opg-core-health-check": "1.0.*",

Your config/application.config.php should look something like this

$modules = array(


Example controller action: uses the environmental variables checker service and returns error 500 and json error if there are any missing.

    public function checkEnvVarsAreSetAction()
        try {
        } catch (HttpException $e) {
            // Environment variable(s) missing:

            return new JsonModel(array('error' => $e->getMessage()));

        return $this->getResponse();


  1. Clone it.
  2. Install dependencies via composer. If you don't have composer then follow the steps to download it from their site:
  3. run PHPUnit.
git clone
cd opg-core-health-check.git
composer install
php ./vendor/bin/phpunit


  1. Clone it.
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D


2015-04-16: Repository repurposed as a zf2 module from original empty zf2 skeleton app