Problem/Motivation

Method "Symfony\Component\Serializer\Encoder\EncoderInterface::supportsEncoding()" will return "bool" as of its next major version. Doing the same in implementation "Drupal\serialization\Encoder\JsonEncoder" will be required when upgrading.

Method "Symfony\Component\Serializer\Encoder\DecoderInterface::supportsDecoding()" will return "bool" as of its next major version. Doing the same in implementation "Drupal\serialization\Encoder\JsonEncoder" will be required when upgrading.

Method "Symfony\Component\Serializer\Encoder\EncoderInterface::encode()" will return "string" as of its next major version. Doing the same in implementation "Drupal\serialization\Encoder\XmlEncoder" will be required when upgrading.

Method "Symfony\Component\Serializer\Encoder\EncoderInterface::supportsEncoding()" will return "bool" as of its next major version. Doing the same in implementation "Drupal\serialization\Encoder\XmlEncoder" will be required when upgrading.

Method "Symfony\Component\Serializer\Encoder\DecoderInterface::decode()" will return "mixed" as of its next major version. Doing the same in implementation "Drupal\serialization\Encoder\XmlEncoder" will be required when upgrading.

Method "Symfony\Component\Serializer\Encoder\DecoderInterface::supportsDecoding()" will return "bool" as of its next major version. Doing the same in implementation "Drupal\serialization\Encoder\XmlEncoder" will be required when upgrading.

Steps to reproduce

Proposed resolution

Add the various return type hints.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#2 3232832-2.patch1.93 KBdaffie

Comments

daffie created an issue. See original summary.

daffie’s picture

Status: Active » Needs review
StatusFileSize
new1.93 KB

The fix.

daffie’s picture

Version: 9.3.x-dev » 10.0.x-dev
longwave’s picture

Status: Needs review » Reviewed & tested by the community

@daffie though as long as those extend the Symfony implementation and not either of JsonEncoder and XmlEncoder we are fine? but that would mean checking each case by hand.

This is OK to go into 10.0.x though.

  • catch committed 6f7d2ef on 10.0.x
    Issue #3232832 by daffie, longwave: [Symfony 6] Add various type hints...
catch’s picture

Status: Reviewed & tested by the community » Fixed

I think it's OK to just commit this one to 10.0.x.

Committed 6f7d2ef and pushed to 10.0.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.