PHPackages                             lullabot/drupal-symfony-lock - 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. lullabot/drupal-symfony-lock

ActiveLibrary

lullabot/drupal-symfony-lock
============================

Use Drupal's lock backends with Symfony's locking API.

1.2.0(2y ago)042.5k—8.3%1GPL-2.0-or-laterPHPPHP ^8.0

Since May 4Pushed 2y ago2 watchersCompare

[ Source](https://github.com/Lullabot/drupal-symfony-lock)[ Packagist](https://packagist.org/packages/lullabot/drupal-symfony-lock)[ RSS](/packages/lullabot-drupal-symfony-lock/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (7)Used By (0)

Drupal Symfony Lock
===================

[](#drupal-symfony-lock)

[![CircleCI](https://camo.githubusercontent.com/30d74e6ff69d799ff7640cb5f0c9f1d147fb8e030da64feabf1df529426fe603/68747470733a2f2f636972636c6563692e636f6d2f67682f4c756c6c61626f742f64727570616c2d73796d666f6e792d6c6f636b2e7376673f7374796c653d737667)](https://circleci.com/gh/Lullabot/drupal-symfony-lock) [![Maintainability](https://camo.githubusercontent.com/ef2faf55dd0b448b8f3a42bf1a4b011c8c32752bd5ea2df243833084174f2f16/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f36386136343039323464353638636637353738312f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/Lullabot/drupal-symfony-lock/maintainability) [![Test Coverage](https://camo.githubusercontent.com/f8ab622e020913ac4e3a9e9c2ad50e9a84c4dbcfb23cc3c03eb55026a3d09844/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f36386136343039323464353638636637353738312f746573745f636f766572616765)](https://codeclimate.com/github/Lullabot/drupal-symfony-lock/test_coverage)

Do you want to use a PHP library that requires Symfony's [Lock Component](https://symfony.com/doc/3.4/components/lock.html) in your Drupal site? This library maps Drupal's [LockBackendInterface](https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Lock%21LockBackendInterface.php/interface/LockBackendInterface/8.5.x) to a [Symfony StoreInterface](https://api.symfony.com/3.4/Symfony/Component/HttpKernel/HttpCache/StoreInterface.html).

Usage
-----

[](#usage)

Require this library in your Drupal module:

`$ composer require lullabot/drupal-symfony-lock`

Inject lock service from the Drupal container, and use it when constructing this class:

```
