Expand file tree Collapse file tree 4 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ services:
22
22
Phauthentic\Symfony\ProblemDetails\ExceptionConversion\GenericExceptionConverter :
23
23
arguments :
24
24
$problemDetailsFactory : ' @Phauthentic\Symfony\ProblemDetails\ProblemDetailsFactoryInterface'
25
+ $environment : ' %kernel.environment%'
25
26
tags : ['phauthentic.problem_details.exception_converter']
26
27
27
28
Phauthentic\Symfony\ProblemDetails\ThrowableToProblemDetailsKernelListener :
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class GenericExceptionConverter implements ExceptionConverterInterface
26
26
*/
27
27
public function __construct (
28
28
protected ProblemDetailsFactoryInterface $ problemDetailsFactory ,
29
- protected string $ environment = ' prod ' ,
29
+ protected string $ environment ,
30
30
protected array $ mappers = []
31
31
) {
32
32
}
Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ public function setUp(): void
25
25
parent ::setUp ();
26
26
27
27
$ this ->converter = new GenericExceptionConverter (
28
- problemDetailsFactory: new ProblemDetailsFactory ()
28
+ problemDetailsFactory: new ProblemDetailsFactory (),
29
+ environment: 'prod '
29
30
);
30
31
}
31
32
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ public function testCreateValidResponse(): void
25
25
$ container = new ContainerBuilder ();
26
26
$ loader = new YamlFileLoader ($ container , new FileLocator (__DIR__ . '/../../config ' ));
27
27
$ loader ->load ('services.yaml ' );
28
+ $ container ->setParameter ('kernel.environment ' , 'prod ' );
28
29
$ container ->compile ();
29
30
30
31
// Assert
0 commit comments