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

Commit0027d1c

Browse files
bug#40273 [Cache] fix setting items' metadata on commit() (nicolas-grekas)
This PR was merged into the 4.4 branch.Discussion----------[Cache] fix setting items' metadata on commit()| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets |Fix#36697| License | MIT| Doc PR | -Commits-------9bb4b31 [Cache] fix setting items' metadata on commit()
2 parents8054d1d +9bb4b31 commit0027d1c

15 files changed

+8
-13
lines changed

‎src/Symfony/Component/Cache/Adapter/AbstractTagAwareAdapter.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ static function ($deferred, &$expiredIds) use ($getId, $tagPrefix, $defaultLifet
110110
}
111111

112112
$byLifetime[$ttl][$getId($key)] =$value;
113+
$item->metadata =$item->newMetadata;
113114
}
114115

115116
return$byLifetime;

‎src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ static function ($deferred) {
8383
$tagsByKey = [];
8484
foreach ($deferredas$key =>$item) {
8585
$tagsByKey[$key] =$item->newMetadata[CacheItem::METADATA_TAGS] ?? [];
86+
$item->metadata =$item->newMetadata;
8687
}
8788

8889
return$tagsByKey;

‎src/Symfony/Component/Cache/Tests/Adapter/FilesystemTagAwareAdapterTest.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
usePsr\Cache\CacheItemPoolInterface;
1515
useSymfony\Component\Cache\Adapter\FilesystemTagAwareAdapter;
16-
useSymfony\Component\Cache\Tests\Traits\TagAwareTestTrait;
1716

1817
/**
1918
* @group time-sensitive

‎src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
usePsr\Cache\CacheItemPoolInterface;
1515
useSymfony\Component\Cache\Adapter\PdoAdapter;
16-
useSymfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
1716

1817
/**
1918
* @group time-sensitive

‎src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
useDoctrine\DBAL\DriverManager;
1515
usePsr\Cache\CacheItemPoolInterface;
1616
useSymfony\Component\Cache\Adapter\PdoAdapter;
17-
useSymfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
1817

1918
/**
2019
* @group time-sensitive

‎src/Symfony/Component/Cache/Tests/Traits/PdoPruneableTrait.php‎renamed to ‎src/Symfony/Component/Cache/Tests/Adapter/PdoPruneableTrait.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespaceSymfony\Component\Cache\Tests\Traits;
12+
namespaceSymfony\Component\Cache\Tests\Adapter;
1313

1414
trait PdoPruneableTrait
1515
{

‎src/Symfony/Component/Cache/Tests/Adapter/PredisTagAwareAdapterTest.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
usePsr\Cache\CacheItemPoolInterface;
1515
useSymfony\Component\Cache\Adapter\RedisTagAwareAdapter;
16-
useSymfony\Component\Cache\Tests\Traits\TagAwareTestTrait;
1716

1817
/**
1918
* @group integration

‎src/Symfony/Component/Cache/Tests/Adapter/PredisTagAwareClusterAdapterTest.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
usePsr\Cache\CacheItemPoolInterface;
1515
useSymfony\Component\Cache\Adapter\RedisTagAwareAdapter;
16-
useSymfony\Component\Cache\Tests\Traits\TagAwareTestTrait;
1716

1817
/**
1918
* @group integration

‎src/Symfony/Component/Cache/Tests/Adapter/RedisTagAwareAdapterTest.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
usePsr\Cache\CacheItemPoolInterface;
1515
useSymfony\Component\Cache\Adapter\RedisTagAwareAdapter;
16-
useSymfony\Component\Cache\Tests\Traits\TagAwareTestTrait;
1716
useSymfony\Component\Cache\Traits\RedisProxy;
1817

1918
/**

‎src/Symfony/Component/Cache/Tests/Adapter/RedisTagAwareArrayAdapterTest.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
usePsr\Cache\CacheItemPoolInterface;
1515
useSymfony\Component\Cache\Adapter\RedisTagAwareAdapter;
16-
useSymfony\Component\Cache\Tests\Traits\TagAwareTestTrait;
1716

1817
/**
1918
* @group integration

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp