From a877cbb50bde9d16ce68acbacfed480bf7ef379c Mon Sep 17 00:00:00 2001 From: Simon Berger Date: Fri, 23 Feb 2024 11:28:48 +0100 Subject: [PATCH] Fix PHP str_replace call with parameter #3 is null deprecation --- DependencyInjection/Factory/Resolver/AwsS3ResolverFactory.php | 2 +- .../Factory/Resolver/FlysystemResolverFactory.php | 2 +- .../Factory/Resolver/AwsS3ResolverFactoryTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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