Follow-up to #3627338: Serializer::getJsonSchema() throws a TypeError when passed a class name. JsonSchemaProviderSerializerInterface::getJsonSchema() declares mixed $object, but only an object returns a schema. A class name throws a TypeError about the return type. Assuming #3627338 gets committed, passing an array is deprecated in Drupal 12.1.0.

In Drupal 13.0.0:

  • Type $object as object on JsonSchemaProviderSerializerInterface::getJsonSchema() and JsonSchemaProviderSerializerTrait::getJsonSchema().
  • Remove the array deprecation from SerializationTest::testGetJsonSchemaArrayDeprecation().
  • Remove the @todo from the interface docblock.

Comments

dries created an issue.