patchlevel / worker
Gives the opportunity to build a stable worker that terminates properly when limits are exceeded.
1.5.0
2025-11-27 15:33 UTC
Requires
- php: ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0
- symfony/event-dispatcher: ^5.4.26 || ^6.4.0 || ^7.0.0 || ^8.0.0
Requires (Dev)
- infection/infection: ^0.31.9
- patchlevel/coding-standard: ^1.3.0
- phpat/phpat: ^0.12.0
- phpbench/phpbench: ^1.2.15
- phpstan/phpstan: ^2.1.32
- phpstan/phpstan-phpunit: ^2.0.8
- phpunit/phpunit: ^11.5.3
- symfony/var-dumper: ^5.4.29 || ^6.4.0 || ^7.0.0 || ^8.0.0
This package is auto-updated.
Last update: 2026-06-17 04:35:09 UTC
README
Worker
A small library to build stable, long-running workers that terminate gracefully when limits are exceeded or a SIGTERM signal is received. Perfect for daemonized console commands running under Docker, Kubernetes, supervisor or systemd, where the process manager restarts the worker after it exits.
Features
- Configurable run, memory and time limits
- Graceful shutdown on SIGTERM
- Extensible via events and custom listeners
- PSR-3 logging of the worker lifecycle
- Plays well with Symfony and Laravel console commands
Installation
composer require patchlevel/worker
Documentation
- Documentation
- Related Blog