You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
[Deprecation] Since symfony/lock 5.2: Symfony\Component\Lock\Store\RetryTillSaveStore is deprecated
How to reproduce
use Symfony\Component\Lock\Store\RedisStore;
use Symfony\Component\Lock\Store\RetryTillSaveStore;
$redis = new Redis();
$redis->connect('localhost');
$persistingStore = new RedisStore($redis);
$blockingStore = new RetryTillSaveStore($persistingStore);
As of Symfony 5.0 the StoreInterface has been split into BlockingStoreInterface and PersistingStoreInterface. To use any of the persistent locks (Redis, PDO, etc) they need to be decorated by the RetryTillSaveStore.
<?php
use Symfony\Component\Lock\Store\RedisStore;
use Symfony\Component\Lock\Store\RetryTillSaveStore;
$redis = new Redis();
$redis->connect('localhost');
$persistingStore = new RedisStore($redis);
$blockingStore = new RetryTillSaveStore($persistingStore);
$task = $schedule->run(PHP_BINARY . ' email.php');
$task
->everyFiveMinutes()
->preventOverlapping($blockingStore);
Crunz version: 2.3.1
PHP version: 7.3
Operating system type and version: ubuntu 20.04
Description
[Deprecation] Since symfony/lock 5.2: Symfony\Component\Lock\Store\RetryTillSaveStore is deprecated
How to reproduce
use Symfony\Component\Lock\Store\RedisStore;
use Symfony\Component\Lock\Store\RetryTillSaveStore;
$redis = new Redis();
$redis->connect('localhost');
$persistingStore = new RedisStore($redis);
$blockingStore = new RetryTillSaveStore($persistingStore);
$task = $schedule->run(PHP_BINARY . ' email.php');
$task
->everyFiveMinutes()
->preventOverlapping($blockingStore);
Possible Solution
Additional context
The text was updated successfully, but these errors were encountered: