Download the PHP package browncat/healthcheck-bundle without Composer

On this page you can find all versions of the php package browncat/healthcheck-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package healthcheck-bundle

Health Check Bundle

This bundle can be used to easily write health checks and expose endpoints which can be used by e.g. Kubernetes to determine the health of the application.

This bundle consists of two core components that interweave with eachother, checkers and checks.

Usage

This package can be installed using composer:

composer require browncat/healthcheck-bundle

Enable endpoints

This bundle comes with a set of endpoints which can be enabled to expose the following set of endpoints:

To enable them all add the following to your routes.yaml:

Bundle provided health checks

This bundle comes with some pre defined health checks. These checks are not enabled by default as to not get into the way of your workflow. They can be enabled and configured through Symfony's config component.

Enable bundle provided health checks

To enable for example the check doctrine.connection create or modify the file config/packages/healthcheck.yaml and add the following:

A list of package provided health checks can be found here.

The config above will enable the doctrine connection check for all available checkers. To use a subset of checkers add the following to the config:

A list of availble checkers can be found here

List of bundle provided health checks

id description since
doctrine.connection Checks if all connections configured in doctrine work. v0.1.0

Creating your own health checks

Health checks are defined in classes extending Browncat\HealthCheckBundle\Check\HealthCheck. For example, you may want to check the connection between the application and a remote system:

Registering the health check

Health checks must be registered as services and tagged with the health_check.check tag. If you’re using the default services.yaml configuration, this is already done for you, thanks to autoconfiguration.

Naming a check

A check should have a common name. This makes sure it can be located if a big list of checks is executed. A check can be named by populating the proteced $name.

Passing or failing a check

A check can be failed or passed by passing a boolean value to the $succeeded propety.

Skipping a check

To skip a check set the property $skipped to true.

(Optional) set checkers

By default all checkers (readiness, liveness and maybe some other configured ones) run the check you've written. If you want to narrow the check down to only run with a specific checker populate public static $checkers with the class references of the desired checker.

List of available checkers


All versions of healthcheck-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2 || ^8.0
psr/log Version ^1|^2|^3
symfony/config Version ^4.4.3|^5.0|^6.0
symfony/dependency-injection Version ^4.4.3|^5.0|^6.0
symfony/framework-bundle Version ^4.4.3|^5.0|^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package browncat/healthcheck-bundle contains the following files

Loading the files please wait ....