PHPackages                             bileto/critical-section - 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. bileto/critical-section

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

bileto/critical-section
=======================

Lightweight class supporting critical section locking

v2.1.0(5y ago)122.6k↓43.2%12MITPHPPHP &gt;=7.1

Since May 10Pushed 4y ago3 watchersCompare

[ Source](https://github.com/bileto/criticalsection)[ Packagist](https://packagist.org/packages/bileto/critical-section)[ RSS](/packages/bileto-critical-section/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (4)Versions (5)Used By (2)

Critical Sections for PHP [![Build Status](https://camo.githubusercontent.com/3b06065a091b428c800625df505f1335d42414a5bf9386a95f440de95f2c1705/68747470733a2f2f7472617669732d63692e6f72672f62696c65746f2f437269746963616c53656374696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/bileto/CriticalSection)
===========================================================================================================================================================================================================================================================================================================================

[](#critical-sections-for-php-)

Description
-----------

[](#description)

Lightweight class supporting critical section locking in PHP.

It requires **PHP &gt;= 7.1** and no other dependency.

Example
-------

[](#example)

```
$pdo = new PDO('...');
$driver = new Bileto\CriticalSection\Driver\PdoPgsqlDriver($pdo);
$criticalSection = new Bileto\CriticalSection\CriticalSection($driver);

$criticalSection->enter('Section Label');

// Perform set of steps of critical tasks

$criticalSection->leave('Section Label');
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 62.5% 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 ~408 days

Total

4

Last Release

2069d ago

Major Versions

v1.0.1 → v2.0.02020-09-17

PHP version history (2 changes)v1.0.0PHP &gt;=7.0.0

v2.0.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/4ef9d9b4f18ff559cf0dfecccd8593840b04c26c09a95a396d8cdab865aba127?d=identicon)[bileto](/maintainers/bileto)

![](https://avatars.githubusercontent.com/u/865447?v=4)[Martin Štekl](/maintainers/stekycz)[@stekycz](https://github.com/stekycz)

---

Top Contributors

[![stekycz](https://avatars.githubusercontent.com/u/865447?v=4)](https://github.com/stekycz "stekycz (20 commits)")[![jspetrak](https://avatars.githubusercontent.com/u/146057?v=4)](https://github.com/jspetrak "jspetrak (11 commits)")[![trejjam](https://avatars.githubusercontent.com/u/3594540?v=4)](https://github.com/trejjam "trejjam (1 commits)")

---

Tags

critical-sectionlocksparallelparallellockscritical-section

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/bileto-critical-section/health.svg)

```
[![Health](https://phpackages.com/badges/bileto-critical-section/health.svg)](https://phpackages.com/packages/bileto-critical-section)
```

###  Alternatives

[veewee/composer-run-parallel

Run composer tasks in parallel

91748.2k13](/packages/veewee-composer-run-parallel)[recca0120/laravel-parallel

64116.7k](/packages/recca0120-laravel-parallel)[bluepsyduck/symfony-process-manager

A process manager for Symfony processes, able to run them in parallel.

10784.6k3](/packages/bluepsyduck-symfony-process-manager)[brlabrussia/parallel-stub

Provide parallel PHP extension stub

115.9k1](/packages/brlabrussia-parallel-stub)

PHPackages © 2026

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