PHPackages                             deepeloper/lib-process - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. deepeloper/lib-process

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

deepeloper/lib-process
======================

PHP-process Lock library

1.0.1(2y ago)26MITPHPPHP &gt;=8.2

Since Jun 22Pushed 2y ago1 watchersCompare

[ Source](https://github.com/deepeloper/lib-process)[ Packagist](https://packagist.org/packages/deepeloper/lib-process)[ Docs](https://github.com/deepeloper/lib-process)[ RSS](/packages/deepeloper-lib-process/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (3)Versions (4)Used By (0)

PHP-process Lock library
========================

[](#php-process-lock-library)

[![Packagist version](https://camo.githubusercontent.com/fed9e636289758ac535a98e66dabec09de208123efc4ebfe3f8bf1bac7a97646/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64656570656c6f7065722f6c69622d6673)](https://packagist.org/packages/deepeloper/lib-process)[![PHP from Packagist](https://camo.githubusercontent.com/bb788378dcb27f2b1d213e922f0169ce54022ff4c9d3d484418b7e4b5aa46154/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f64656570656c6f7065722f6c69622d70726f636573732e737667)](http://php.net/)[![GitHub license](https://camo.githubusercontent.com/499421c7b0ed242413f1678d6912db63189932b8b9abebeb3abca50178c66c8e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f64656570656c6f7065722f6c69622d70726f636573732e737667)](https://github.com/deepeloper/lib-process/blob/master/LICENSE)[![GitHub issues](https://camo.githubusercontent.com/4c9f20bb9de0fb60537ba7f3e6b5cc58d159bed511df37c9d04830565c884420/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d7261772f64656570656c6f7065722f6c69622d70726f636573732e737667)](https://github.com/deepeloper/lib-process/issues)[![Packagist](https://camo.githubusercontent.com/7995f7d7bd58174de49950fecbd0c632361779c1a5528f2bc36e33703d9007f0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64656570656c6f7065722f6c69622d70726f636573732e737667)](https://packagist.org/packages/deepeloper/lib-process)[![CI](https://github.com/deepeloper/lib-process/actions/workflows/ci.yml/badge.svg?event=push)](https://github.com/deepeloper/lib-process/actions)[![codecov](https://camo.githubusercontent.com/eb28b4a1f18a277712e665e3ca60fedb69889b72a7e8812b5072264e28cfa056/68747470733a2f2f636f6465636f762e696f2f67682f64656570656c6f7065722f6c69622d70726f636573732f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/deepeloper/lib-process)

[![Donation](https://camo.githubusercontent.com/a59a69ad3d5f2b3205fc267af930d371787bc02ca5a4369f1d2556b119b28f16/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174696f6e2d566973612c2532304d6173746572436172642c2532304d61657374726f2c253230556e696f6e5061792c253230596f6f4d6f6e65792c2532302544302539432544302539382544302541302d726564)](https://yoomoney.ru/to/41001351141494)

Compatibility
-------------

[](#compatibility)

![PHP 7.4](https://camo.githubusercontent.com/f890e669ed82c75fdc4b1920edf722e65e1d73fe4b48f082dec171a66a457d54/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d2533453d372e342d253233374138364238)

Installing
----------

[](#installing)

Run `composer require deepeloper/lib-process`.

Usage
-----

[](#usage)

```
use deepeloper\Lib\Process\Lock;
use deepeloper\Lib\Process\Lock\Storage;

try {
    $lock = new Lock(
        Storage::getLayer("Filesystem", ['path' => "path/to/lock"]),
        60 * 5, // 5 minutes
        true, // Destroy previous lock, false by default
        // "...", // custom lock id
    );
} catch (RuntimeException $e) {
    switch ($e->getCode()) {
        case Lock::EXISTING_IS_VALID:
            // Previous lock is valid, interrupt process.
            die;
        default:
            throw $e;
    }
}

// Long time loop
while (true) {
    // ...
    try {
        $lock->update(true); // true to call \set_time_limit(), false by default
    } catch (RuntimeException $e) {
        // Lock was destroyed by another instance of the daemon
    }
}
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 55.6% 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 ~374 days

Total

2

Last Release

732d ago

PHP version history (2 changes)1.0.0PHP &gt;=7.4

1.0.1PHP &gt;=8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1831371?v=4)[deepeloper](/maintainers/deepeloper)[@deepeloper](https://github.com/deepeloper)

---

Top Contributors

[![deepeloper](https://avatars.githubusercontent.com/u/1831371?v=4)](https://github.com/deepeloper "deepeloper (5 commits)")[![donbidon](https://avatars.githubusercontent.com/u/30872013?v=4)](https://github.com/donbidon "donbidon (4 commits)")

---

Tags

phpprocesslock

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/deepeloper-lib-process/health.svg)

```
[![Health](https://phpackages.com/badges/deepeloper-lib-process/health.svg)](https://phpackages.com/packages/deepeloper-lib-process)
```

###  Alternatives

[yriveiro/php-fslock

A simple lock implementation using flock.

19102.5k](/packages/yriveiro-php-fslock)[php-lrpm/php-lrpm

PHP Long Running Process Manager

189.1k1](/packages/php-lrpm-php-lrpm)

PHPackages © 2026

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