Skip to content

Commit 78a66e0

Browse files
authored
Merge pull request #449 from php-http/1-to-2
1 to 2
2 parents 710ae3a + 8987784 commit 78a66e0

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee
1919

2020
# Version 1
2121

22+
# 1.33.0 - 2024-02-27
23+
24+
- Support php-http/cache-plugin 2.0 and bump minimal version to 1.7 by defaulting the stream factory for cache to `httplug.psr17_stream_factory` (#448).
25+
2226
# 1.32.0 - 2023-12-06
2327

2428
- Added support for Symfony 7

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
"kriswallsmith/buzz": "<0.17",

src/DependencyInjection/Configuration.php

Lines changed: 3 additions & 3 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;
@@ -739,7 +739,7 @@ private function createCachePluginNode(): NodeDefinition
739739
// Cannot set both respect_cache_headers and respect_response_cache_directives
740740
return isset($config['respect_cache_headers'], $config['respect_response_cache_directives']);
741741
})
742-
->thenInvalid('You can\'t provide config option "respect_cache_headers" and "respect_response_cache_directives" simultaniously. Use "respect_response_cache_directives" instead.')
742+
->thenInvalid('You can\'t provide config option "respect_cache_headers" and "respect_response_cache_directives" simultaneously. Use "respect_response_cache_directives" instead.')
743743
->end()
744744
->children()
745745
->scalarNode('cache_key_generator')
@@ -851,7 +851,7 @@ private function createCachePluginNode(): NodeDefinition
851851
->cannotBeEmpty()
852852
->end()
853853
->scalarNode('stream_factory')
854-
->info('This must be a service id to a service implementing '.StreamFactory::class)
854+
->info('This must be a service id to a service implementing '.StreamFactoryInterface::class)
855855
->defaultValue('httplug.psr17_stream_factory')
856856
->cannotBeEmpty()
857857
->end()

tests/Unit/DependencyInjection/ConfigurationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ public function testInvalidCacheConfig(): void
348348
$file = __DIR__.'/../../Resources/Fixtures/config/invalid_cache_config.yml';
349349

350350
$this->expectException(InvalidConfigurationException::class);
351-
$this->expectExceptionMessage('Invalid configuration for path "httplug.plugins.cache.config": You can\'t provide config option "respect_cache_headers" and "respect_response_cache_directives" simultaniously. Use "respect_response_cache_directives" instead.');
351+
$this->expectExceptionMessage('Invalid configuration for path "httplug.plugins.cache.config": You can\'t provide config option "respect_cache_headers" and "respect_response_cache_directives" simultaneously. Use "respect_response_cache_directives" instead.');
352352
$this->assertProcessedConfigurationEquals([], [$file]);
353353
}
354354

0 commit comments

Comments
 (0)