Verified Commit 3449a8b6 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3276195 by mondrake, catch:...

Issue #3276195 by mondrake, catch: Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsEncoding/supportsDecoding will require a new "array $context" argument in the next major version
parent 35b8d4f5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager, Ent
  /**
   * {@inheritdoc}
   */
  public function supportsNormalization($data, $format = NULL): bool {
  public function supportsNormalization($data, string $format = NULL, array $context = []): bool {
    return FALSE;
  }

+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ public function __construct(ResourceObjectNormalizationCacher $cacher) {
  /**
   * {@inheritdoc}
   */
  public function supportsDenormalization($data, $type, $format = NULL) {
  public function supportsDenormalization($data, string $type, string $format = NULL, array $context = []): bool {
    return FALSE;
  }

+2 −2
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ public function denormalize($data, $type, $format = NULL, array $context = []):
  /**
   * {@inheritdoc}
   */
  public function supportsNormalization($data, $format = NULL, array $context = []): bool {
  public function supportsNormalization($data, string $format = NULL, array $context = []): bool {
    return $this->selfSupportsNormalization($data, $format, $context) || $this->fallbackNormalizer->supportsNormalization($data, $format, $context);
  }

@@ -104,7 +104,7 @@ private function selfSupportsNormalization($data, $format = NULL, array $context
  /**
   * {@inheritdoc}
   */
  public function supportsDenormalization($data, $type, $format = NULL, array $context = []): bool {
  public function supportsDenormalization($data, string $type, string $format = NULL, array $context = []): bool {
    return $this->selfSupportsDenormalization($data, $type, $format, $context) || $this->fallbackNormalizer->supportsDenormalization($data, $type, $format, $context);
  }

+2 −2
Original line number Diff line number Diff line
@@ -37,14 +37,14 @@ public function __construct(JsonEncode $encodingImpl = NULL, JsonDecode $decodin
  /**
   * {@inheritdoc}
   */
  public function supportsEncoding($format): bool {
  public function supportsEncoding(string $format, array $context = []): bool {
    return in_array($format, static::$format);
  }

  /**
   * {@inheritdoc}
   */
  public function supportsDecoding($format): bool {
  public function supportsDecoding(string $format, array $context = []): bool {
    return in_array($format, static::$format);
  }

+2 −2
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ public function encode($data, $format, array $context = []): string {
  /**
   * {@inheritdoc}
   */
  public function supportsEncoding($format): bool {
  public function supportsEncoding(string $format, array $context = []): bool {
    return in_array($format, static::$format);
  }

@@ -85,7 +85,7 @@ public function decode($data, $format, array $context = []): mixed {
  /**
   * {@inheritdoc}
   */
  public function supportsDecoding($format): bool {
  public function supportsDecoding(string $format, array $context = []): bool {
    return in_array($format, static::$format);
  }

Loading