-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split ProblemExceptionNormalizer forward-compatibilityinto separate f…
…ile to be PHP 7.4 compatible
- Loading branch information
1 parent
2d40bee
commit f06c4aa
Showing
2 changed files
with
31 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/ExceptionHandling/Normalizer/ProblemExceptionNormalizer.php8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the OpenapiBundle package. | ||
* | ||
* (c) Niels Nijens <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Nijens\OpenapiBundle\ExceptionHandling\Normalizer; | ||
|
||
use ArrayObject; | ||
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; | ||
|
||
/** | ||
* Normalizes a {@see Throwable} implementing the {@see ProblemExceptionInterface}. | ||
* | ||
* @author Niels Nijens <[email protected]> | ||
*/ | ||
final class ProblemExceptionNormalizer extends AbstractProblemExceptionNormalizer implements NormalizerInterface, NormalizerAwareInterface | ||
{ | ||
public function normalize($object, $format = null, array $context = []): float|int|bool|ArrayObject|array|string|null | ||
{ | ||
return $this->doNormalize($object, $format, $context); | ||
} | ||
} |