Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Semaphore Bundle

Semaphore Bundle Laravel Package

kitpages/semaphore-bundle

kitpages/semaphore-bundle is a Symfony bundle for semaphore-based locking, offering services to acquire and release locks so concurrent processes can coordinate access to shared resources. Useful for guarding critical sections, preventing race conditions, and limiting parallel execution in PHP appli...

View on GitHub
Deep Wiki
Context7

This is a Symfony2 bundle that provides a semaphore system.

Frequently asked questions about Semaphore Bundle
Is kitpages/semaphore-bundle a Laravel package?
No. It is a Symfony bundle that ships a bundle class, a DI extension, and YAML/XML service wiring; there is no ServiceProvider, no facade, and no config publishing for Laravel. It was built for Symfony FrameworkBundle and does not target illuminate/* components at all.
Can I use kitpages/semaphore-bundle in a Laravel application?
Only with heavy friction, and it is not recommended. Laravel has no bundle registration or container compilation model, and the package's Composer constraints pin old Symfony versions that typically conflict with a modern Laravel tree (symfony/* ^6 or ^7). If you genuinely need the algorithm, vendoring the small semaphore class is the only defensible route.
How do you install kitpages/semaphore-bundle?
In a Symfony app you would run composer require kitpages/semaphore-bundle and then register Kitpages\SemaphoreBundle\KitpagesSemaphoreBundle in AppKernel or bundles.php. That registration step has no equivalent in Laravel. The package ships no Laravel install path, no publishable config, and no artisan command.
What is kitpages/semaphore-bundle used for?
It adds a lightweight semaphore and locking layer so PHP processes can acquire a named lock, run a critical section, and then release it. Typical uses are preventing overlapping cron jobs, coordinating queue workers, and guarding shared resources. Lock state is held in a host-local filesystem mutex rather than a distributed lock service.
Does kitpages/semaphore-bundle support PHP 8 and modern Laravel versions?
No. The last release was 2017-03-24, well before PHP 8 existed, and there have been no commits in roughly eight years. There is no PHP 8.x support, no security response path, and no Illuminate integration. Any claim of Laravel compatibility should be treated as unsupported.
Is kitpages/semaphore-bundle still maintained?
No, it is effectively abandoned: last release March 2017, no commits since, around 10 stars and zero dependents. There is no issue tracker activity to mine for known failure modes and no downstream projects to inherit compatibility patches from. Adopting it in a new build means owning unmanaged risk.
What should Laravel developers use instead of kitpages/semaphore-bundle?
Laravel has shipped first-class atomic locks since 5.5: Cache::lock('resource', $ttl) with block() and get(), backed by Redis, Memcached, DynamoDB, or the database. For scheduled work use $schedule->command(...)->withoutOverlapping(), and for per-job de-duplication use ShouldBeUnique or the WithoutOverlapping middleware. All of these are cluster-aware and actively maintained.
How is lock storage configured in kitpages/semaphore-bundle?
Lock state is configured through Symfony DI service definitions in YAML or XML, and the shipped backend is a host-local filesystem mutex. Exclusion therefore only works between processes on the same machine sharing the same mount. It is not a distributed lock and will not coordinate across containers or nodes.
Can kitpages/semaphore-bundle coordinate workers across multiple servers?
No. Filesystem semaphores mutual-exclude only within a single host and a single shared filesystem, and flock() over network mounts such as NFS is notoriously unreliable. The package also predates modern lock hygiene like TTLs and fencing tokens, so stale locks after a killed process are a real hazard. For distributed workers, use a Redis-backed Cache::lock instead.
How do I migrate off kitpages/semaphore-bundle?
Inventory every call site of the semaphore service interface, then replace it behind a thin internal ResourceLock abstraction so the backend stays swappable. Implement that abstraction with Cache::lock(), or with a small in-house flock() wrapper if a filesystem lock is genuinely mandatory on a single host. Do not add the Symfony bundle to a Laravel dependency graph during the migration.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource