Skip to content

Commit dce46ba

Browse files
authored
Fixed bug that exception normalizer cannot support symfony 7 (#6755)
1 parent a918fb2 commit dce46ba

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

tests/AsCommandAndClosureCommandTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
use Hyperf\Di\MethodDefinitionCollectorInterface;
3333
use Hyperf\Di\ReflectionManager;
3434
use Hyperf\Di\ScanHandler\NullScanHandler;
35-
use Hyperf\Serializer\SerializerFactory;
36-
use Hyperf\Serializer\SymfonyNormalizer;
35+
use Hyperf\Serializer\SimpleNormalizer;
3736
use HyperfTest\Command\Command\Annotation\TestAsCommand;
3837
use Mockery;
3938
use PHPUnit\Framework\Attributes\CoversNothing;
@@ -193,7 +192,7 @@ protected function getContainer()
193192
return $logger;
194193
});
195194

196-
$container->shouldReceive('get')->with(NormalizerInterface::class)->andReturn(new SymfonyNormalizer((new SerializerFactory())->__invoke()));
195+
$container->shouldReceive('get')->with(NormalizerInterface::class)->andReturn(new SimpleNormalizer());
197196
$container->shouldReceive('has')->with(NormalizerInterface::class)->andReturn(true);
198197
$container->shouldReceive('get')->with(MethodDefinitionCollectorInterface::class)->andReturn(new MethodDefinitionCollector());
199198
$container->shouldReceive('has')->with(MethodDefinitionCollectorInterface::class)->andReturn(true);

0 commit comments

Comments
 (0)