Issue by _pratik_, asad_ahmed, rivimey, NivethaSubramaniyan, longwave: FieldableEntityNormalizerTrait::extractBundleData() has incorrect return type

(cherry picked from commit 7ad6ad979a)
merge-requests/1961/merge
Alex Pott 2022-11-30 11:28:36 +00:00
parent 8bed000244
commit a4fc325d58
No known key found for this signature in database
GPG Key ID: BDA67E7EE836E5CE
1 changed files with 4 additions and 3 deletions
core/modules/serialization/src/Normalizer

View File

@ -82,14 +82,15 @@ trait FieldableEntityNormalizerTrait {
* Denormalizes the bundle property so entity creation can use it.
*
* @param array $data
* The data being denormalized.
* The data being denormalized. The bundle information will be removed.
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type_definition
* The entity type definition.
*
* @throws \Symfony\Component\Serializer\Exception\UnexpectedValueException
* If the bundle value is invalid or the bundle type is ineligible.
*
* @return string
* The valid bundle name.
* @return array
* An array containing a single $bundle_key => $bundle_value pair.
*/
protected function extractBundleData(array &$data, EntityTypeInterface $entity_type_definition) {
$bundle_key = $entity_type_definition->getKey('bundle');