mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
add id to docgen normalization fo a person
This commit is contained in:
parent
3df2335cf4
commit
bf4a3a2c91
@ -74,6 +74,7 @@ class PersonDocGenNormalizer implements
|
||||
|
||||
$data = [
|
||||
'type' => 'person',
|
||||
'id' => $person->getId(),
|
||||
'isNull' => false,
|
||||
'civility' => $this->normalizer->normalize($person->getCivility(), $format, array_merge($context, ['docgen:expects' => Civility::class])),
|
||||
'firstName' => $person->getFirstName(),
|
||||
@ -151,7 +152,7 @@ class PersonDocGenNormalizer implements
|
||||
$normalizer = new NormalizeNullValueHelper($this->normalizer, 'type', 'person');
|
||||
|
||||
$attributes = [
|
||||
'firstName', 'lastName', 'age', 'altNames', 'text',
|
||||
'id', 'firstName', 'lastName', 'age', 'altNames', 'text',
|
||||
'civility' => Civility::class,
|
||||
'birthdate' => DateTimeInterface::class,
|
||||
'deathdate' => DateTimeInterface::class,
|
||||
|
@ -38,6 +38,7 @@ final class PersonDocGenNormalizerTest extends KernelTestCase
|
||||
use ProphecyTrait;
|
||||
|
||||
private const BLANK = [
|
||||
'id' => '',
|
||||
'firstName' => '',
|
||||
'lastName' => '',
|
||||
'altNames' => '',
|
||||
|
Loading…
x
Reference in New Issue
Block a user