Change record status: 
Project: 
Introduced in branch: 
10.3.x
Introduced in version: 
10.3.0
Description: 

To be able to differentiate between serializers like JSON or YAML which cannot serialize classed PHP objects, and serializers that can (eg. the PHP serializer),\Drupal\Component\Serialization\ObjectAwareSerializationInterface has been introduced. This interface can be used in type-hints or instanceof checks where object-serialization is required to make sure the right kind of serializer is passed.

Other change notices for same issue

Impacts: 
Module developers

Comments

james.williams’s picture

Is "...serializers like JSON or YAML, which can serialize (classed) PHP objects..." missing a not? i.e. should it be the following?

"...serializers like JSON or YAML, which can not serialize (classed) PHP objects..."

ComputerMinds

jaypan’s picture

I fixed that and updated the text.

Contact me to contract me for D7 -> D10/11 migrations.