2017 © Pedro Peláez
 

library wait4services

Small tool that waits until services are online.

image

uuf6429/wait4services

Small tool that waits until services are online.

  • Thursday, February 8, 2018
  • by uuf6429
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

wait4services

build status coverage report Minimum PHP Version License: MIT Packagist, (*1)

A simple tool for waiting until all required services are up and running., (*2)

screenshot, (*3)

Installation

Add via composer, either locally or globally (depending on your needs):, (*4)

composer require uuf6429/wait4services

(to install globally just add "global" before "require"), (*5)

Usage

Let's say you want to run some tests on a system bootstrapped from Docker, this tool could be used like so:, (*6)

# start docker services
docker-compose up -d

# wait for the services
vendor/bin/wait4services \
  "pdo-mysql://dbuser:dbpass@docker/somedb" \
  "http://docker/wp-admin"

# run your tests
vendor/bin/phpunit

Extending

It's a bit difficult to extend due to autoloading, however it can be achieved with the following steps:, (*7)

  1. Create your handler extending uuf6429\WFS\Handler\Handler
  2. At the end of that file (or in some other file) use the following code:, (*8)

    if (uuf6429\WFS\HandlerManager::class) {
        uuf6429\WFS\HandlerManager::getInstance()
            ->register(new YourCustomHandler());
    }
    
  3. In your composer.json make sure to put the previous file in autoload\files section:, (*9)

    "autoload": {
        "files": ["path/to/your/handler.php"]
    }
    

The Versions

08/02 2018

dev-master

9999999-dev

Small tool that waits until services are online.

  Sources   Download

MIT

The Requires

 

The Development Requires

08/02 2018

0.0.2

0.0.2.0

Small tool that waits until services are online.

  Sources   Download

MIT

The Requires

 

The Development Requires

03/02 2018

0.0.1

0.0.1.0

Small tool that waits until services are online.

  Sources   Download

MIT

The Requires

 

The Development Requires