evolver/diagnostics

Configurable diagnostic tests for PHP applications

v1.0.0 2015-02-27 14:47 UTC

This package is not auto-updated.

Last update: 2024-03-16 14:41:03 UTC


README

Configurable diagnostic tests for PHP applications based on ZendDiagnostics

Packagist Downloads License Build

Requirements

This application has the following requirements:

  • PHP 5.4 or higher

Installation

You can install this application in two different ways

As a Phar release (recommended)

Download the latest release to yor project root

As a Composer dependency

Install Composer in your project:

$ curl -s https://getcomposer.org/installer | php

Create a composer.json file in your project root:

{
    "require": {
        "evolver/diagnostics": "dev-master"
    }
}

Install this package via Composer:

$ php composer.phar install

Or add this package as a requirement to an existing project:

$ php composer.phar require evolver/diagnostics

Usage

Create a diagnostics.yml file in your project root:

checks:
  - name: "PhpVersion"
    arguments:
      expectedVersion: "5.4"
      operator: ">="

You may specify any other diagnostic checks according to the sample above

This application ships with some additional diagnostic checks:

  • PhpExtension - make sure given extension is (not) loaded in a defined version

Run diagnostic checks:

  1. with the Phar release: $ php diagnostics.phar check
  2. with the Composer binary: $ vendor/bin/diagnostics check

Additional diagnostic checks

This package comes with some additional diagnostic checks

PhpExtension

Make sure that a given extension is loaded

checks:
  - name: "PhpExtension"
    arguments:
      extensionName: "mbstring"

Make sure that a given extension is loaded in a defined version

checks:
  - name: "PhpExtension"
    arguments:
      extensionName: "yaml"
      extensionVersion: "1.1.1"

Make sure that a given extension is absent

checks:
  - name: "PhpExtension"
    arguments:
      extensionName: "apc"
      extensionVersion: false