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
@@ -94,13 +95,13 @@ class CachingHttpClient implements HttpClientInterface, ResetInterface
94
95
*/
95
96
publicfunction__construct(
96
97
privateHttpClientInterface$client,
97
-
TagAwareAdapterInterface|StoreInterface$cache,
98
+
TagAwareCacheInterface|StoreInterface$cache,
98
99
array$defaultOptions = [],
99
100
privatereadonlybool$sharedCache = true,
100
101
privatereadonly ?int$maxTtl = null,
101
102
) {
102
103
if ($cacheinstanceof StoreInterface) {
103
-
trigger_deprecation('symfony/http-client', '7.3', 'Passing a "%s" as constructor\'s 2nd argument of "%s" is deprecated, "%s" expected.', StoreInterface::class, __CLASS__, TagAwareAdapterInterface::class);
104
+
trigger_deprecation('symfony/http-client', '7.3', 'Passing a "%s" as constructor\'s 2nd argument of "%s" is deprecated, "%s" expected.', StoreInterface::class, __CLASS__, TagAwareCacheInterface::class);
yield$this->cache->get("{$key}_chunk_{$i}", function (ItemInterface$item) use ($fullUrlTag): never {
690
689
$this->cache->invalidateTags([$fullUrlTag]);
691
690
692
-
thrownewChunkCacheItemNotFoundException(\sprintf('Missing cache item for chunk with key "%s". This indicates an internal cache inconsistency.', $chunkItem->getKey()));
693
-
}
694
-
695
-
yield$chunkItem->get();
691
+
thrownewChunkCacheItemNotFoundException(\sprintf('Missing cache item for chunk with key "%s". This indicates an internal cache inconsistency.', $item->getKey()));
Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpClient/Tests/LegacyCachingHttpClientTest.php
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ class LegacyCachingHttpClientTest extends TestCase
28
28
29
29
publicfunctiontestRequestHeaders()
30
30
{
31
-
$this->expectDeprecation('Since symfony/http-client 7.3: Passing a "Symfony\Component\HttpKernel\HttpCache\StoreInterface" as constructor\'s 2nd argument of "Symfony\Component\HttpClient\CachingHttpClient" is deprecated, "Symfony\Component\Cache\Adapter\TagAwareAdapterInterface" expected.');
31
+
$this->expectDeprecation('Since symfony/http-client 7.3: Passing a "Symfony\Component\HttpKernel\HttpCache\StoreInterface" as constructor\'s 2nd argument of "Symfony\Component\HttpClient\CachingHttpClient" is deprecated, "Symfony\Contracts\Cache\TagAwareCacheInterface" expected.');
32
32
33
33
$options = [
34
34
'headers' => [
@@ -51,7 +51,7 @@ public function testRequestHeaders()
51
51
52
52
publicfunctiontestDoesNotEvaluateResponseBody()
53
53
{
54
-
$this->expectDeprecation('Since symfony/http-client 7.3: Passing a "Symfony\Component\HttpKernel\HttpCache\StoreInterface" as constructor\'s 2nd argument of "Symfony\Component\HttpClient\CachingHttpClient" is deprecated, "Symfony\Component\Cache\Adapter\TagAwareAdapterInterface" expected.');
54
+
$this->expectDeprecation('Since symfony/http-client 7.3: Passing a "Symfony\Component\HttpKernel\HttpCache\StoreInterface" as constructor\'s 2nd argument of "Symfony\Component\HttpClient\CachingHttpClient" is deprecated, "Symfony\Contracts\Cache\TagAwareCacheInterface" expected.');
@@ -63,7 +63,7 @@ public function testDoesNotEvaluateResponseBody()
63
63
64
64
publicfunctiontestDoesNotIncludeFile()
65
65
{
66
-
$this->expectDeprecation('Since symfony/http-client 7.3: Passing a "Symfony\Component\HttpKernel\HttpCache\StoreInterface" as constructor\'s 2nd argument of "Symfony\Component\HttpClient\CachingHttpClient" is deprecated, "Symfony\Component\Cache\Adapter\TagAwareAdapterInterface" expected.');
66
+
$this->expectDeprecation('Since symfony/http-client 7.3: Passing a "Symfony\Component\HttpKernel\HttpCache\StoreInterface" as constructor\'s 2nd argument of "Symfony\Component\HttpClient\CachingHttpClient" is deprecated, "Symfony\Contracts\Cache\TagAwareCacheInterface" expected.');
@@ -82,7 +82,7 @@ public function testDoesNotIncludeFile()
82
82
83
83
publicfunctiontestDoesNotReadFile()
84
84
{
85
-
$this->expectDeprecation('Since symfony/http-client 7.3: Passing a "Symfony\Component\HttpKernel\HttpCache\StoreInterface" as constructor\'s 2nd argument of "Symfony\Component\HttpClient\CachingHttpClient" is deprecated, "Symfony\Component\Cache\Adapter\TagAwareAdapterInterface" expected.');
85
+
$this->expectDeprecation('Since symfony/http-client 7.3: Passing a "Symfony\Component\HttpKernel\HttpCache\StoreInterface" as constructor\'s 2nd argument of "Symfony\Component\HttpClient\CachingHttpClient" is deprecated, "Symfony\Contracts\Cache\TagAwareCacheInterface" expected.');
@@ -99,7 +99,7 @@ public function testDoesNotReadFile()
99
99
100
100
publicfunctiontestRemovesXContentDigest()
101
101
{
102
-
$this->expectDeprecation('Since symfony/http-client 7.3: Passing a "Symfony\Component\HttpKernel\HttpCache\StoreInterface" as constructor\'s 2nd argument of "Symfony\Component\HttpClient\CachingHttpClient" is deprecated, "Symfony\Component\Cache\Adapter\TagAwareAdapterInterface" expected.');
102
+
$this->expectDeprecation('Since symfony/http-client 7.3: Passing a "Symfony\Component\HttpKernel\HttpCache\StoreInterface" as constructor\'s 2nd argument of "Symfony\Component\HttpClient\CachingHttpClient" is deprecated, "Symfony\Contracts\Cache\TagAwareCacheInterface" expected.');
0 commit comments