diff --git a/DependencyInjection/Factory/Resolver/AwsS3ResolverFactory.php b/DependencyInjection/Factory/Resolver/AwsS3ResolverFactory.php index 29976cd34..75991911d 100644 --- a/DependencyInjection/Factory/Resolver/AwsS3ResolverFactory.php +++ b/DependencyInjection/Factory/Resolver/AwsS3ResolverFactory.php @@ -92,7 +92,7 @@ public function addConfiguration(ArrayNodeDefinition $builder) ->cannotBeEmpty() ->end() ->scalarNode('cache_prefix') - ->defaultValue(null) + ->defaultValue('') ->end() ->arrayNode('client_config') ->isRequired() diff --git a/DependencyInjection/Factory/Resolver/FlysystemResolverFactory.php b/DependencyInjection/Factory/Resolver/FlysystemResolverFactory.php index 76e542bc7..f6090aba1 100644 --- a/DependencyInjection/Factory/Resolver/FlysystemResolverFactory.php +++ b/DependencyInjection/Factory/Resolver/FlysystemResolverFactory.php @@ -49,7 +49,7 @@ public function addConfiguration(ArrayNodeDefinition $builder) ->cannotBeEmpty() ->end() ->scalarNode('cache_prefix') - ->defaultValue(null) + ->defaultValue('') ->end() ->scalarNode('root_url') ->isRequired() diff --git a/Tests/DependencyInjection/Factory/Resolver/AwsS3ResolverFactoryTest.php b/Tests/DependencyInjection/Factory/Resolver/AwsS3ResolverFactoryTest.php index 10d4677ab..19f4d7a08 100644 --- a/Tests/DependencyInjection/Factory/Resolver/AwsS3ResolverFactoryTest.php +++ b/Tests/DependencyInjection/Factory/Resolver/AwsS3ResolverFactoryTest.php @@ -431,7 +431,7 @@ public function testAddDefaultOptionsIfNotSetOnAddConfiguration(): void $this->assertSame([], $config['get_options']); $this->assertArrayHasKey('cache_prefix', $config); - $this->assertNull($config['cache_prefix']); + $this->assertSame('', $config['cache_prefix']); } public function testSupportAwsV3ClientConfig(): void