Skip to content

Commit e32c7ef

Browse files
committed
support cache plugin 2.x, bump to minimum 1.7 to always support psr17 stream factory
1 parent 22dae44 commit e32c7ef

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
},
4444
"conflict": {
4545
"php-http/guzzle6-adapter": "<1.1",
46+
"php-http/cache-plugin": "<1.7.0",
4647
"php-http/curl-client": "<2.0",
4748
"php-http/socket-client": "<2.0"
4849
},

src/DependencyInjection/Configuration.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
use Http\Client\Plugin\Vcr\Recorder\RecorderInterface;
1414
use Http\Message\CookieJar;
1515
use Http\Message\Formatter;
16-
use Http\Message\StreamFactory;
1716
use Psr\Cache\CacheItemPoolInterface;
17+
use Psr\Http\Message\StreamFactoryInterface;
1818
use Psr\Log\LoggerInterface;
1919
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
2020
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
@@ -744,7 +744,7 @@ private function createCachePluginNode(): NodeDefinition
744744
// Cannot set both respect_cache_headers and respect_response_cache_directives
745745
return isset($config['respect_cache_headers'], $config['respect_response_cache_directives']);
746746
})
747-
->thenInvalid('You can\'t provide config option "respect_cache_headers" and "respect_response_cache_directives" simultaniously. Use "respect_response_cache_directives" instead.')
747+
->thenInvalid('You can\'t provide config option "respect_cache_headers" and "respect_response_cache_directives" simultaneously. Use "respect_response_cache_directives" instead.')
748748
->end()
749749
->children()
750750
->scalarNode('cache_key_generator')
@@ -856,8 +856,8 @@ private function createCachePluginNode(): NodeDefinition
856856
->cannotBeEmpty()
857857
->end()
858858
->scalarNode('stream_factory')
859-
->info('This must be a service id to a service implementing '.StreamFactory::class)
860-
->defaultValue('httplug.stream_factory')
859+
->info('This must be a service id to a service implementing '.StreamFactoryInterface::class)
860+
->defaultValue('httplug.psr17_stream_factory')
861861
->cannotBeEmpty()
862862
->end()
863863
->end()

0 commit comments

Comments
 (0)