Skip to content

Commit 16951e4

Browse files
author
Florian Krämer
committed
Attempt to fix the converter
1 parent cfb7789 commit 16951e4

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

config/services.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ services:
2222
$exceptionConverters:
2323
- '@Phauthentic\Symfony\ProblemDetails\ExceptionConversion\ValidationFailedExceptionConverter'
2424
- '@Phauthentic\Symfony\ProblemDetails\ExceptionConversion\HttpExceptionConverter'
25-
- '@Phauthentic\Symfony\ProblemDetails\ExceptionConversion\GenericThrowableConverter'
25+
- '@Phauthentic\Symfony\ProblemDetails\ExceptionConversion\GenericExceptionConverter'
2626
tags:
2727
- { name: 'kernel.event_listener', event: 'kernel.exception', priority: 0 }

src/ExceptionConversion/GenericThrowableConverter.php renamed to src/ExceptionConversion/GenericExceptionConverter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*
2525
* @link https://www.rfc-editor.org/rfc/rfc9457.html
2626
*/
27-
class GenericThrowableConverter implements ExceptionConverterInterface
27+
class GenericExceptionConverter implements ExceptionConverterInterface
2828
{
2929
/**
3030
* @param ProblemDetailsFactoryInterface $problemDetailsFactory

tests/Unit/ExceptionConversion/GenericThrowableConverterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Phauthentic\Symfony\ProblemDetails\Tests\Unit\ExceptionConversion;
66

77
use Exception;
8-
use Phauthentic\Symfony\ProblemDetails\ExceptionConversion\GenericThrowableConverter;
8+
use Phauthentic\Symfony\ProblemDetails\ExceptionConversion\GenericExceptionConverter;
99
use Phauthentic\Symfony\ProblemDetails\ExceptionConversion\HttpExceptionConverter;
1010
use Phauthentic\Symfony\ProblemDetails\ProblemDetailsFactory;
1111
use Phauthentic\Symfony\ProblemDetails\ProblemDetailsResponse;
@@ -24,7 +24,7 @@ public function setUp(): void
2424
{
2525
parent::setUp();
2626

27-
$this->converter = new GenericThrowableConverter(
27+
$this->converter = new GenericExceptionConverter(
2828
problemDetailsFactory: new ProblemDetailsFactory()
2929
);
3030
}

tests/Unit/ThrowableToProblemDetailsKernelListenerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
use Exception;
88
use InvalidArgumentException;
9-
use Phauthentic\Symfony\ProblemDetails\ExceptionConversion\GenericThrowableConverter;
9+
use Phauthentic\Symfony\ProblemDetails\ExceptionConversion\GenericExceptionConverter;
1010
use Phauthentic\Symfony\ProblemDetails\ProblemDetailsFactory;
1111
use PHPUnit\Framework\Attributes\DataProvider;
1212
use PHPUnit\Framework\Attributes\Test;
@@ -45,7 +45,7 @@ public function testOnKernelException(string $environment, bool $shouldHaveTrace
4545

4646
$listener = new ThrowableToProblemDetailsKernelListener(
4747
[
48-
new GenericThrowableConverter(new ProblemDetailsFactory(), $environment),
48+
new GenericExceptionConverter(new ProblemDetailsFactory(), $environment),
4949
]
5050
);
5151

0 commit comments

Comments
 (0)