uuf6429/wait4services
Composer 安装命令:
composer require uuf6429/wait4services
包简介
Small tool that waits until services are online.
README 文档
README
A simple tool for waiting until all required services are up and running.
Installation
Add via composer, either locally or globally (depending on your needs):
composer require uuf6429/wait4services
(to install globally just add "global" before "require")
Usage
Let's say you want to run some tests on a system bootstrapped from Docker, this tool could be used like so:
# 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:
-
Create your handler extending
uuf6429\WFS\Handler\Handler -
At the end of that file (or in some other file) use the following code:
if (uuf6429\WFS\HandlerManager::class) { uuf6429\WFS\HandlerManager::getInstance() ->register(new YourCustomHandler()); }
-
In your
composer.jsonmake sure to put the previous file inautoload\filessection:"autoload": { "files": ["path/to/your/handler.php"] }
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-02-03