File tree 1 file changed +10
-2
lines changed
Filter options
1 file changed +10
-2
lines changed
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ create your own encoder that uses the
32
32
return Yaml::dump($data);
33
33
}
34
34
35
- public function supportsEncoding($format, array $context = [] )
35
+ public function supportsEncoding($format)
36
36
{
37
37
return 'yaml' === $format;
38
38
}
@@ -42,12 +42,20 @@ create your own encoder that uses the
42
42
return Yaml::parse($data);
43
43
}
44
44
45
- public function supportsDecoding($format, array $context = [] )
45
+ public function supportsDecoding($format)
46
46
{
47
47
return 'yaml' === $format;
48
48
}
49
49
}
50
50
51
+ .. tip ::
52
+
53
+ If you need access to ``$context `` in your ``supportsDecoding `` or
54
+ ``supportsEncoding `` method, make sure to implement
55
+ ``Symfony\Component\Serializer\Encoder\ContextAwareDecoderInterface ``
56
+ or ``Symfony\Component\Serializer\Encoder\ContextAwareEncoderInterface `` accordingly.
57
+
58
+
51
59
Registering it in your app
52
60
--------------------------
53
61
You can’t perform that action at this time.
0 commit comments