Skip to content

Commit fee9069

Browse files
Support cache-plugin 2.0 for Symfony 8
1 parent 07e2fd5 commit fee9069

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"matthiasnoback/symfony-dependency-injection-test": "^4.3.1 || ^5.0 || ^6.2.0",
5757
"nyholm/nsa": "^1.1",
5858
"nyholm/psr7": "^1.2.1",
59-
"php-http/cache-plugin": "^1.7",
59+
"php-http/cache-plugin": "^1.7 || ^2.0",
6060
"php-http/mock-client": "^1.2",
6161
"php-http/promise": "^1.0",
6262
"php-http/throttle-plugin": "^1.1",

tests/Functional/ProfilingTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
use GuzzleHttp\Psr7\Request;
88
use Http\Client\Common\Plugin;
99
use Http\Client\Common\PluginClient;
10-
use Http\Discovery\StreamFactoryDiscovery;
11-
use Http\Discovery\UriFactoryDiscovery;
10+
use Http\Discovery\Psr17FactoryDiscovery;
1211
use Http\HttplugBundle\Collector\Collector;
1312
use Http\HttplugBundle\Collector\Formatter;
1413
use Http\HttplugBundle\Collector\ProfileClient;
@@ -40,7 +39,7 @@ public function setUp(): void
4039
public function testProfilingWithCachePlugin(): void
4140
{
4241
$client = $this->createClient([
43-
new Plugin\CachePlugin(new ArrayAdapter(), StreamFactoryDiscovery::find(), [
42+
new Plugin\CachePlugin(new ArrayAdapter(), Psr17FactoryDiscovery::findStreamFactory(), [
4443
'respect_response_cache_directives' => [],
4544
'default_ttl' => 86400,
4645
]),
@@ -79,7 +78,7 @@ public function testProfilingWhenPluginThrowException(): void
7978
public function testProfiling(): void
8079
{
8180
$client = $this->createClient([
82-
new Plugin\AddHostPlugin(UriFactoryDiscovery::find()->createUri('https://example.com')),
81+
new Plugin\AddHostPlugin(Psr17FactoryDiscovery::findUriFactory()->createUri('https://example.com')),
8382
new Plugin\RedirectPlugin(),
8483
new Plugin\RetryPlugin(),
8584
]);

0 commit comments

Comments
 (0)