PHPackages                             patchlevel/worker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. patchlevel/worker

ActiveLibrary[CLI &amp; Console](/categories/cli)

patchlevel/worker
=================

Gives the opportunity to build a stable worker that terminates properly when limits are exceeded.

1.5.0(7mo ago)2582.0k↓42.2%[1 issues](https://github.com/patchlevel/worker/issues)[2 PRs](https://github.com/patchlevel/worker/pulls)1MITPHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Jul 11Pushed 2d ago2 watchersCompare

[ Source](https://github.com/patchlevel/worker)[ Packagist](https://packagist.org/packages/patchlevel/worker)[ Docs](https://github.com/patchlevel/worker)[ RSS](/packages/patchlevel-worker/feed)WikiDiscussions 1.6.x Synced yesterday

READMEChangelog (9)Dependencies (9)Versions (21)Used By (1)

[![Mutation testing badge](https://camo.githubusercontent.com/3f8f4699589c5b50479c3b5b4dd15ef5364529073af21449f449e4e2fb90620c/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d25324670617463686c6576656c253246776f726b6572253246312e362e78)](https://dashboard.stryker-mutator.io/reports/github.com/patchlevel/worker/1.6.x)[![Latest Stable Version](https://camo.githubusercontent.com/ee3e94a3cc08bc65078428b6955d5f63f9ae5f1984af8f5bf459041fa03fd29a/68747470733a2f2f706f7365722e707567782e6f72672f70617463686c6576656c2f776f726b65722f76)](//packagist.org/packages/patchlevel/worker)[![License](https://camo.githubusercontent.com/041ad278a1348741957e4c7dfa4964b32a6044d6c64a6099298d87d433805e88/68747470733a2f2f706f7365722e707567782e6f72672f70617463686c6576656c2f776f726b65722f6c6963656e7365)](//packagist.org/packages/patchlevel/worker)

Worker
======

[](#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
--------

[](#features)

- Configurable run, memory and time [limits](https://patchlevel.dev/docs/worker/latest/getting-started#limits)
- [Graceful shutdown](https://patchlevel.dev/docs/worker/latest/getting-started#graceful-shutdown-on-sigterm) on SIGTERM
- Extensible via [events and custom listeners](https://patchlevel.dev/docs/worker/latest/events)
- [PSR-3 logging](https://patchlevel.dev/docs/worker/latest/getting-started#logging) of the worker lifecycle
- Plays well with [Symfony and Laravel console commands](https://patchlevel.dev/docs/worker/latest/integration)

Installation
------------

[](#installation)

```
composer require patchlevel/worker
```

Documentation
-------------

[](#documentation)

- [Documentation](https://patchlevel.dev/docs/worker/latest)
- Related [Blog](https://patchlevel.dev/blog)

###  Health Score

54

—

FairBetter than 96% of packages

Maintenance74

Regular maintenance activity

Popularity40

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 85.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~72 days

Recently: every ~127 days

Total

16

Last Release

5d ago

PHP version history (4 changes)1.0.0-beta1PHP ~8.1.0 || ~8.2.0

1.1.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0

1.3.0PHP ~8.2.0 || ~8.3.0 || ~8.4.0

1.5.0PHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/470138?v=4)[David Badura](/maintainers/DavidBadura)[@DavidBadura](https://github.com/DavidBadura)

---

Top Contributors

[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (276 commits)")[![DavidBadura](https://avatars.githubusercontent.com/u/470138?v=4)](https://github.com/DavidBadura "DavidBadura (32 commits)")[![DanielBadura](https://avatars.githubusercontent.com/u/2017762?v=4)](https://github.com/DanielBadura "DanielBadura (16 commits)")

---

Tags

consoleworker

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/patchlevel-worker/health.svg)

```
[![Health](https://phpackages.com/badges/patchlevel-worker/health.svg)](https://phpackages.com/packages/patchlevel-worker)
```

###  Alternatives

[drush/drush

Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.

2.4k60.6M803](/packages/drush-drush)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M386](/packages/easycorp-easyadmin-bundle)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[drupal/console-core

Drupal Console Core

13614.7M12](/packages/drupal-console-core)[laminas/laminas-cli

Command-line interface for Laminas projects

564.1M72](/packages/laminas-laminas-cli)[coresphere/console-bundle

This bundle allows you accessing the symfony2 console via your browser

140338.9k5](/packages/coresphere-console-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
