PHPackages                             tourze/json-rpc-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. tourze/json-rpc-lock-bundle

ActiveSymfony-bundle

tourze/json-rpc-lock-bundle
===========================

JsonRPC锁定处理

2.0.0(4mo ago)09.0k20MITPHPCI passing

Since Apr 14Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/tourze/json-rpc-lock-bundle)[ Packagist](https://packagist.org/packages/tourze/json-rpc-lock-bundle)[ RSS](/packages/tourze-json-rpc-lock-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (22)Versions (10)Used By (20)

JsonRPC Lock Bundle
===================

[](#jsonrpc-lock-bundle)

[English](README.md) | [中文](README.zh-CN.md)

[![Build Status](https://camo.githubusercontent.com/178f699d3535971305e02b01b36d9a51ad3e3dfeee338895dff042b0d7783d24/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f746f75727a652f6a736f6e2d7270632d6c6f636b2d62756e646c652f63692e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265)](https://github.com/tourze/json-rpc-lock-bundle/actions)[![PHP Version Require](https://camo.githubusercontent.com/bb821db01510ff40b30e534a934ac4c18a1c6353066700e753af00bb1ce7cec5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f746f75727a652f6a736f6e2d7270632d6c6f636b2d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/json-rpc-lock-bundle)[![License](https://camo.githubusercontent.com/2437a240c89ecc5fce5755a7f3a94241204c6d147a2f07e882b4a6245541f766/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f746f75727a652f6a736f6e2d7270632d6c6f636b2d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/json-rpc-lock-bundle)[![Latest Version](https://camo.githubusercontent.com/de32628946c361561abda502b8547994faeceaa712979b4ce36e023cd1bbe7f8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f75727a652f6a736f6e2d7270632d6c6f636b2d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/json-rpc-lock-bundle)[![Total Downloads](https://camo.githubusercontent.com/6f8edd0dcccbb4755bc6c2b56995c4260e8e21dc45383741c278ea73541bf7b7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f75727a652f6a736f6e2d7270632d6c6f636b2d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/json-rpc-lock-bundle)[![Code Coverage](https://camo.githubusercontent.com/b2c7ffa0afe65ce862629910982630d7b7f91556e426aea59e6df89e3ceac7a2/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f746f75727a652f6a736f6e2d7270632d6c6f636b2d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://codecov.io/gh/tourze/json-rpc-lock-bundle)

A Symfony Bundle that provides automatic locking functionality for JsonRPC interfaces to handle concurrent request control and idempotency.

Features
--------

[](#features)

- Automatic concurrency control for JsonRPC requests
- User-based lock resource identification
- Request idempotency handling with caching
- Graceful exception handling and logging
- Support for custom lock resource strategies
- Fallback retry mechanism for lock failures

Dependencies
------------

[](#dependencies)

This bundle requires:

- PHP 8.1 or higher
- Symfony 7.3 or higher
- tourze/json-rpc-core
- tourze/lock-service-bundle
- tourze/backtrace-helper
- Symfony Security Bundle

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

[](#installation)

Install via Composer:

```
composer require tourze/json-rpc-lock-bundle
```

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

[](#configuration)

Register the bundle in your Symfony application:

```
// config/bundles.php
return [
    // ...
    Tourze\JsonRPCLockBundle\JsonRPCLockBundle::class => ['all' => true],
];
```

No additional configuration is required. The bundle works out of the box with sensible defaults.

Quick Start
-----------

[](#quick-start)

Create a JsonRPC procedure by extending `LockableProcedure`:

```
