Download the PHP package graze/supervisor without Composer

On this page you can find all versions of the php package graze/supervisor. 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 supervisor

Supervisor

Supervisor

Build Status Latest Version PHP ~5.5 MIT Licensed

This library implements CLI process supervisors and aggregate supervisor supervisors in an attempt to limit damage done by failing scripts.

It can be installed in whichever way you prefer, but we recommend [Composer][packagist].

$ composer require graze/supervisor

Documentation

Assuming everything went well with the child process, the supervise method will stop watching the process and you can continue on your business. But what happens to processes that fall flat on their face?

Now we've gone from one script failing to two scripts failing, but how does that help? Well, it doesn't, but that's where handlers come in.

Handlers

Handlers help you control what to do when a child process fails (and when they successfully terminate). You can do anything you like with the handlers:

Now if your process dies, the retry handler will restart it up to a maximim of 3 times. We can do even better than this though; suppose you want to retry 3 times then alert developers and log the error, all before throwing an exception. Just decorate!

This library currently only comes bundled with a few handlers, but by implementing a simple interface you can quickly use your own. Additional core handlers are always welcome!

Supervising the supervisors

So having a supervisor to watch your process is great, but what if you want to supervise multiple processes that are logically linked (ie. batch processing)? You can achieve this by supervising your individual process supervisors.

Just like the process supervisors, the supervisor supervisors handle successful and unsuccessful termination with handlers.

Who supervises the supervisor supervisor?

Depending on the complexity of logically grouped processes, you may need to have many tiers of failure management. This is entirely possible by passing supervisor supervisors into a parent supervisor supervisor. In fact, you can even mix the types of supervisors you supervise!

You can see how things could get crazy pretty quickly. This library, however, is by no means a replacement for true system daemon management. You should use something like systemd or upstart for that.

Contributing

We accept contributions to the source via Pull Request, but passing unit tests must be included before it will be considered for merge.

If you've found a bug, please include a failing test when you create an issue.

License

The content of this library is released under the MIT License by Nature Delivered Ltd..

You can find a copy of this license in LICENSE or at http://opensource.org/licenses/mit.


All versions of supervisor with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
symfony/process Version ^2.5 | ^4.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 graze/supervisor contains the following files

Loading the files please wait ....