1616use Alley \WP \Blocks \Parsed_Block ;
1717use Alley \WP \Types \Serialized_Blocks ;
1818use Alley \WP \Types \Single_Block ;
19- use Symfony \Component \Serializer \Exception \BadMethodCallException ;
20- use Symfony \Component \Serializer \Exception \CircularReferenceException ;
21- use Symfony \Component \Serializer \Exception \ExceptionInterface ;
22- use Symfony \Component \Serializer \Exception \ExtraAttributesException ;
2319use Symfony \Component \Serializer \Exception \InvalidArgumentException ;
24- use Symfony \Component \Serializer \Exception \LogicException ;
25- use Symfony \Component \Serializer \Exception \RuntimeException ;
26- use Symfony \Component \Serializer \Exception \UnexpectedValueException ;
2720use Symfony \Component \Serializer \Normalizer \DenormalizerInterface ;
2821use Symfony \Component \Serializer \Normalizer \NormalizerInterface ;
2922
@@ -34,11 +27,7 @@ final class Block_Normalizer implements NormalizerInterface, DenormalizerInterfa
3427 /**
3528 * Normalizes an object into a set of arrays/scalars.
3629 *
37- * @throws InvalidArgumentException Occurs when the object given is not a supported type for the normalizer.
38- * @throws CircularReferenceException Occurs when the normalizer detects a circular reference when no circular
39- * reference handler can fix it.
40- * @throws LogicException Occurs when the normalizer is not called in an expected context.
41- * @throws ExceptionInterface Occurs for all the other cases of errors.
30+ * @throws InvalidArgumentException Occurs when the object given is not a supported type for the normalizer.
4231 *
4332 * @phpstan-param array<mixed> $context
4433 * @phpstan-return array{blockName: ?string, attrs: array<string, mixed>, innerBlocks: Serialized_Blocks, innerHTML: string, origin: string}
@@ -100,13 +89,7 @@ public function getSupportedTypes( ?string $format ): array {
10089 /**
10190 * Denormalizes data back into an object of the given class.
10291 *
103- * @throws BadMethodCallException Occurs when the normalizer is not called in an expected context.
10492 * @throws InvalidArgumentException Occurs when the arguments are not coherent or not supported.
105- * @throws UnexpectedValueException Occurs when the item cannot be hydrated with the given data.
106- * @throws ExtraAttributesException Occurs when the item doesn't have attribute to receive given data.
107- * @throws LogicException Occurs when the normalizer is not supposed to denormalize.
108- * @throws RuntimeException Occurs if the class cannot be instantiated.
109- * @throws ExceptionInterface Occurs for all the other cases of errors.
11093 *
11194 * @phpstan-param array<mixed> $context
11295 *
0 commit comments