PHPackages                             rsumka/request-lock-bundle - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. rsumka/request-lock-bundle

ActiveSymfony-bundle[HTTP &amp; Networking](/categories/http)

rsumka/request-lock-bundle
==========================

Symfony bundle for handling duplicate requests

1.0.3(4y ago)113MITPHPPHP &gt;=7.4

Since Nov 18Pushed 4y ago1 watchersCompare

[ Source](https://github.com/rsumka/request-lock-bundle)[ Packagist](https://packagist.org/packages/rsumka/request-lock-bundle)[ Docs](https://github.com/rsumka/request-lock-bundle)[ RSS](/packages/rsumka-request-lock-bundle/feed)WikiDiscussions main Synced 6d ago

READMEChangelog (1)Dependencies (2)Versions (5)Used By (0)

RequestLockBundle
=================

[](#requestlockbundle)

About
-----

[](#about)

The aim of this bundle is to prevent from accepting multiple duplicate requests e.g. multiple clicks on submit button on frontend side. At this moment this bundle has two strategies of dealing with duplicate requests:

1. Wait until previous request is finished
2. Throw exception

How does it work
----------------

[](#how-does-it-work)

The bundle uses Symfony Lock component under the hood. Read more here:

When request arrives it locks request in your preferred lock store. By default it's file system. So if you want to make it work on multiple servers, better use RedisStore which will be shared across multiple instances.

To mark requests as identical the bundle compares request headers, url, method and body. In some cases it may not work even requests at first sight looks the same. For example when using Varnish in front of your app, it will append X-Varnish header which contain unique request ID. To handle such cases you can specify ignored headers in bundle configuration.

GET requests will be ignored.

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

[](#installation)

Run `composer require rsumka/request-lock-bundle`

Configuration
-------------

[](#configuration)

By default the bundle won't ignore any headers and will use `wait_for_lock_release_strategy`. After installing bundle you can create configuration file `request_lock.yaml` in config/packages with:

```
request_lock:
  ignored_headers:
    - 'X-Varnish'
  request_duplicate_handling_strategy: 'throw_exception_strategy'
```

Available strategies:

- `wait_for_lock_release_strategy`
- `throw_exception_strategy`

License
-------

[](#license)

See [LICENSE](LICENSE).

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

4

Last Release

1640d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3467b6cbfeccd6b904b99abc7d26d1b650bac3df21954a92dddf709d6b56e2e1?d=identicon)[rsumka](/maintainers/rsumka)

---

Top Contributors

[![rsumka](https://avatars.githubusercontent.com/u/18312449?v=4)](https://github.com/rsumka "rsumka (9 commits)")

---

Tags

symfonybundle

### Embed Badge

![Health badge](/badges/rsumka-request-lock-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/rsumka-request-lock-bundle/health.svg)](https://phpackages.com/packages/rsumka-request-lock-bundle)
```

###  Alternatives

[eightpoints/guzzle-bundle

Integrates Guzzle 6.x, a PHP HTTP Client, into Symfony. Comes with easy and powerful configuration options and optional plugins.

45912.1M55](/packages/eightpoints-guzzle-bundle)[fresh/centrifugo-bundle

Provides communication with web-socket server Centrifugo in Symfony applications.

83375.3k](/packages/fresh-centrifugo-bundle)[p2/ratchet-bundle

Symfony WebSocket bundle using the Ratchet WebSocket library

265.8k](/packages/p2-ratchet-bundle)

PHPackages © 2026

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