Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bug that exception normalizer cannot support symfony 7 #6755

Merged
merged 10 commits into from
May 15, 2024
3 changes: 2 additions & 1 deletion src/serializer/src/ExceptionNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

namespace Hyperf\Serializer;

use ArrayObject;
use Doctrine\Instantiator\Instantiator;
use Hyperf\Di\ReflectionManager;
use Hyperf\Serializer\Contract\CacheableSupportsMethodInterface;
Expand Down Expand Up @@ -73,7 +74,7 @@ public function supportsDenormalization($data, $type, $format = null)
return class_exists($type) && is_a($type, Throwable::class, true);
}

public function normalize($object, ?string $format = null, array $context = [])
public function normalize($object, ?string $format = null, array $context = []): null|array|ArrayObject|bool|float|int|string
huangdijia marked this conversation as resolved.
Show resolved Hide resolved
{
if ($object instanceof Serializable) {
return serialize($object);
Expand Down
Loading