Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita37c0dc

Browse files
committed
[Lock] remove StoreInterface in favor off PersistStoreInterface
1 parent7dee61c commita37c0dc

21 files changed

+57
-94
lines changed

‎UPGRADE-5.0.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,11 @@ Intl
301301
* Removed `Intl::getLocaleBundle()`, use `Locales` instead
302302
* Removed `Intl::getRegionBundle()`, use `Countries` instead
303303

304+
Lock
305+
----
306+
307+
* Removed `Symfony\Component\Lock\StoreInterface` in favor of `Symfony\Component\Lock\BlockingStoreInterface` and `Symfony\Component\Lock\PersistStoreInterface`
308+
304309
Messenger
305310
---------
306311

‎src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
useSymfony\Component\Lock\PersistStoreInterface;
7575
useSymfony\Component\Lock\Store\FlockStore;
7676
useSymfony\Component\Lock\Store\StoreFactory;
77-
useSymfony\Component\Lock\StoreInterface;
7877
useSymfony\Component\Mailer\Mailer;
7978
useSymfony\Component\Messenger\Handler\MessageHandlerInterface;
8079
useSymfony\Component\Messenger\MessageBus;
@@ -1441,7 +1440,7 @@ private function registerLockConfiguration(array $config, ContainerBuilder $cont
14411440
$container->setDefinition($connectionDefinitionId,$connectionDefinition);
14421441
}
14431442

1444-
$storeDefinition =newDefinition(StoreInterface::class);
1443+
$storeDefinition =newDefinition(PersistStoreInterface::class);
14451444
$storeDefinition->setPublic(false);
14461445
$storeDefinition->setFactory([StoreFactory::class,'createStore']);
14471446
$storeDefinition->setArguments([newReference($connectionDefinitionId)]);
@@ -1483,12 +1482,10 @@ private function registerLockConfiguration(array $config, ContainerBuilder $cont
14831482
$container->setAlias('lock.store',newAlias('lock.'.$resourceName.'.store',false));
14841483
$container->setAlias('lock.factory',newAlias('lock.'.$resourceName.'.factory',false));
14851484
$container->setAlias('lock',newAlias('lock.'.$resourceName,false));
1486-
$container->setAlias(StoreInterface::class,newAlias('lock.store',false));
14871485
$container->setAlias(PersistStoreInterface::class,newAlias('lock.store',false));
14881486
$container->setAlias(Factory::class,newAlias('lock.factory',false));
14891487
$container->setAlias(LockInterface::class,newAlias('lock',false));
14901488
}else {
1491-
$container->registerAliasForArgument('lock.'.$resourceName.'.store', StoreInterface::class,$resourceName.'.lock.store');
14921489
$container->registerAliasForArgument('lock.'.$resourceName.'.store', PersistStoreInterface::class,$resourceName.'.lock.store');
14931490
$container->registerAliasForArgument('lock.'.$resourceName.'.factory', Factory::class,$resourceName.'.lock.factory');
14941491
$container->registerAliasForArgument('lock.'.$resourceName, LockInterface::class,$resourceName.'.lock');

‎src/Symfony/Component/Lock/Factory.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Factory implements LoggerAwareInterface
2828

2929
private$store;
3030

31-
publicfunction__construct(StoreInterface$store)
31+
publicfunction__construct(PersistStoreInterface$store)
3232
{
3333
$this->store =$store;
3434

‎src/Symfony/Component/Lock/Lock.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function acquire($blocking = false): ?bool
7171
{
7272
try {
7373
if ($blocking) {
74-
if (!$this->storeinstanceof StoreInterface && !($this->storeinstanceof BlockingStoreInterface &&$this->store->supportsWaitAndSave())) {
74+
if (!($this->storeinstanceof BlockingStoreInterface &&$this->store->supportsWaitAndSave())) {
7575
thrownewNotSupportedException(sprintf('The store "%s" does not support blocking locks.',\get_class($this->store)));
7676
}
7777
$this->store->waitAndSave($this->key);

‎src/Symfony/Component/Lock/Store/CombinedStore.php‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@
1919
useSymfony\Component\Lock\Exception\NotSupportedException;
2020
useSymfony\Component\Lock\Key;
2121
useSymfony\Component\Lock\PersistStoreInterface;
22-
useSymfony\Component\Lock\StoreInterface;
2322
useSymfony\Component\Lock\Strategy\StrategyInterface;
2423

2524
/**
26-
* CombinedStore is aStoreInterface implementation able to manage and synchronize several StoreInterfaces.
25+
* CombinedStore is aPersistStoreInterface implementation able to manage and synchronize several StoreInterfaces.
2726
*
2827
* @author Jérémy Derussé <jeremy@derusse.com>
2928
*/
30-
class CombinedStoreimplementsStoreInterface, LoggerAwareInterface
29+
class CombinedStoreimplementsPersistStoreInterface, LoggerAwareInterface
3130
{
3231
use LoggerAwareTrait;
3332
use ExpiringStoreTrait;

‎src/Symfony/Component/Lock/Store/FlockStore.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
useSymfony\Component\Lock\Exception\LockConflictedException;
1717
useSymfony\Component\Lock\Exception\LockStorageException;
1818
useSymfony\Component\Lock\Key;
19-
useSymfony\Component\Lock\StoreInterface;
19+
useSymfony\Component\Lock\PersistStoreInterface;
2020

2121
/**
22-
* FlockStore is aStoreInterface implementation using the FileSystem flock.
22+
* FlockStore is aPersistStoreInterface implementation using the FileSystem flock.
2323
*
2424
* Original implementation in \Symfony\Component\Filesystem\LockHandler.
2525
*
@@ -28,7 +28,7 @@
2828
* @author Romain Neutron <imprec@gmail.com>
2929
* @author Nicolas Grekas <p@tchwork.com>
3030
*/
31-
class FlockStoreimplementsStoreInterface, BlockingStoreInterface
31+
class FlockStoreimplementsPersistStoreInterface, BlockingStoreInterface
3232
{
3333
private$lockPath;
3434

‎src/Symfony/Component/Lock/Store/MemcachedStore.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
useSymfony\Component\Lock\Exception\InvalidTtlException;
1616
useSymfony\Component\Lock\Exception\LockConflictedException;
1717
useSymfony\Component\Lock\Key;
18-
useSymfony\Component\Lock\StoreInterface;
18+
useSymfony\Component\Lock\PersistStoreInterface;
1919

2020
/**
21-
* MemcachedStore is aStoreInterface implementation using Memcached as store engine.
21+
* MemcachedStore is aPersistStoreInterface implementation using Memcached as store engine.
2222
*
2323
* @author Jérémy Derussé <jeremy@derusse.com>
2424
*/
25-
class MemcachedStoreimplementsStoreInterface
25+
class MemcachedStoreimplementsPersistStoreInterface
2626
{
2727
use ExpiringStoreTrait;
2828

‎src/Symfony/Component/Lock/Store/PdoStore.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
useSymfony\Component\Lock\Exception\LockConflictedException;
2020
useSymfony\Component\Lock\Exception\NotSupportedException;
2121
useSymfony\Component\Lock\Key;
22-
useSymfony\Component\Lock\StoreInterface;
22+
useSymfony\Component\Lock\PersistStoreInterface;
2323

2424
/**
25-
* PdoStore is aStoreInterface implementation using a PDO connection.
25+
* PdoStore is aPersistStoreInterface implementation using a PDO connection.
2626
*
2727
* Lock metadata are stored in a table. You can use createTable() to initialize
2828
* a correctly defined table.
@@ -34,7 +34,7 @@
3434
*
3535
* @author Jérémy Derussé <jeremy@derusse.com>
3636
*/
37-
class PdoStoreimplementsStoreInterface
37+
class PdoStoreimplementsPersistStoreInterface
3838
{
3939
use ExpiringStoreTrait;
4040

‎src/Symfony/Component/Lock/Store/RedisStore.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
useSymfony\Component\Lock\Exception\InvalidTtlException;
1818
useSymfony\Component\Lock\Exception\LockConflictedException;
1919
useSymfony\Component\Lock\Key;
20-
useSymfony\Component\Lock\StoreInterface;
20+
useSymfony\Component\Lock\PersistStoreInterface;
2121

2222
/**
23-
* RedisStore is aStoreInterface implementation using Redis as store engine.
23+
* RedisStore is aPersistStoreInterface implementation using Redis as store engine.
2424
*
2525
* @author Jérémy Derussé <jeremy@derusse.com>
2626
*/
27-
class RedisStoreimplementsStoreInterface
27+
class RedisStoreimplementsPersistStoreInterface
2828
{
2929
use ExpiringStoreTrait;
3030

‎src/Symfony/Component/Lock/Store/RetryTillSaveStore.php‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,14 @@
1818
useSymfony\Component\Lock\Exception\LockConflictedException;
1919
useSymfony\Component\Lock\Key;
2020
useSymfony\Component\Lock\PersistStoreInterface;
21-
useSymfony\Component\Lock\StoreInterface;
2221

2322
/**
24-
* RetryTillSaveStore is aStoreInterface implementation which decorate a non blockingStoreInterface to provide a
23+
* RetryTillSaveStore is aPersistStoreInterface implementation which decorate a non blockingPersistStoreInterface to provide a
2524
* blocking storage.
2625
*
2726
* @author Jérémy Derussé <jeremy@derusse.com>
2827
*/
29-
class RetryTillSaveStoreimplements PersistStoreInterface, BlockingStoreInterface,StoreInterface,LoggerAwareInterface
28+
class RetryTillSaveStoreimplements PersistStoreInterface, BlockingStoreInterface, LoggerAwareInterface
3029
{
3130
use LoggerAwareTrait;
3231

@@ -35,7 +34,7 @@ class RetryTillSaveStore implements PersistStoreInterface, BlockingStoreInterfac
3534
private$retryCount;
3635

3736
/**
38-
* @param PersistStoreInterface $decorated The decoratedStoreInterface
37+
* @param PersistStoreInterface $decorated The decoratedPersistStoreInterface
3938
* @param int $retrySleep Duration in ms between 2 retry
4039
* @param int $retryCount Maximum amount of retry
4140
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp