1 | <?php |
||
11 | final class JmsSerializerAdapter implements SerializerInterface, NormalizerInterface, DenormalizerInterface |
||
12 | { |
||
13 | /** @var JmsSerializer */ |
||
14 | private $serializer; |
||
15 | |||
16 | /** |
||
17 | * JmsSerializerAdapter constructor. |
||
18 | * |
||
19 | * @param JmsSerializer $serializer |
||
20 | */ |
||
21 | 6 | public function __construct(JmsSerializer $serializer) |
|
25 | |||
26 | /** {@inheritdoc} */ |
||
27 | 6 | public function serialize($data, $format, array $context = []) |
|
31 | |||
32 | /** {@inheritdoc} */ |
||
33 | public function deserialize($data, $type, $format, array $context = []) |
||
37 | |||
38 | /** {@inheritdoc} */ |
||
39 | 5 | public function normalize($object, $format = null, array $context = []) |
|
49 | |||
50 | /** {@inheritdoc} */ |
||
51 | public function supportsNormalization($data, $format = null) |
||
55 | |||
56 | /** {@inheritdoc} */ |
||
57 | public function denormalize($data, $class, $format = null, array $context = []) |
||
67 | |||
68 | /** {@inheritdoc} */ |
||
69 | public function supportsDenormalization($data, $type, $format = null) |
||
73 | } |
||
74 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: