You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -78,6 +82,11 @@ public function __construct(array $normalizers = array(), array $encoders = arra
78
82
if ($normalizerinstanceof NormalizerAwareInterface) {
79
83
$normalizer->setNormalizer($this);
80
84
}
85
+
86
+
if (!($normalizerinstanceof NormalizerInterface || $normalizerinstanceof DenormalizerInterface)) {
87
+
@trigger_error(\sprintf('Passing normalizers ("%s") which do not implement either "%s" or "%s" has been deprecated since Symfony 4.2.', \get_class($normalizer), NormalizerInterface::class, DenormalizerInterface::class), E_USER_DEPRECATED);
88
+
// throw new \InvalidArgumentException(\sprintf('The class "%s" does not implement "%s" or "%s".', \get_class($normalizer), NormalizerInterface::class, DenormalizerInterface::class));
89
+
}
81
90
}
82
91
$this->normalizers = $normalizers;
83
92
@@ -93,6 +102,11 @@ public function __construct(array $normalizers = array(), array $encoders = arra
93
102
if ($encoderinstanceof EncoderInterface) {
94
103
$realEncoders[] = $encoder;
95
104
}
105
+
106
+
if (!($encoderinstanceof EncoderInterface || $encoderinstanceof DecoderInterface)) {
107
+
@trigger_error(\sprintf('Passing encoders ("%s") which do not implement either "%s" or "%s" has been deprecated since Symfony 4.2.', \get_class($encoder), EncoderInterface::class, DecoderInterface::class), E_USER_DEPRECATED);
108
+
// throw new \InvalidArgumentException(\sprintf('The class "%s" does not implement "%s" or "%s".', \get_class($normalizer), EncoderInterface::class, DecoderInterface::class));
* @expectedDeprecation Passing normalizers ("stdClass") which do not implement either "Symfony\Component\Serializer\Normalizer\NormalizerInterface" or "Symfony\Component\Serializer\Normalizer\DenormalizerInterface" has been deprecated since Symfony 4.2.
* @expectedDeprecation Passing encoders ("stdClass") which do not implement either "Symfony\Component\Serializer\Encoder\EncoderInterface" or "Symfony\Component\Serializer\Encoder\DecoderInterface" has been deprecated since Symfony 4.2.
0 commit comments