1 | <?php |
||
10 | final class JmsSerializerAdapter implements SerializerInterface, NormalizerInterface |
||
11 | { |
||
12 | /** @var JmsSerializer */ |
||
13 | private $serializer; |
||
14 | |||
15 | /** |
||
16 | * JmsSerializerAdapter constructor. |
||
17 | * |
||
18 | * @param JmsSerializer $serializer |
||
19 | */ |
||
20 | 6 | public function __construct(JmsSerializer $serializer) |
|
24 | |||
25 | /** {@inheritdoc} */ |
||
26 | 6 | public function serialize($data, $format, array $context = []) |
|
30 | |||
31 | /** {@inheritdoc} */ |
||
32 | public function deserialize($data, $type, $format, array $context = []) |
||
36 | |||
37 | /** {@inheritdoc} */ |
||
38 | 5 | public function normalize($object, $format = null, array $context = []) |
|
48 | |||
49 | /** {@inheritdoc} */ |
||
50 | public function supportsNormalization($data, $format = null) |
||
54 | } |
||
55 |
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: