diff --git a/src/Bundle/ChillMainBundle/Repository/GenderRepository.php b/src/Bundle/ChillMainBundle/Repository/GenderRepository.php index 357e301b5..438f49d95 100644 --- a/src/Bundle/ChillMainBundle/Repository/GenderRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/GenderRepository.php @@ -2,6 +2,16 @@ namespace Chill\MainBundle\Repository; +use Chill\MainBundle\Entity\Gender; +use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\ORM\EntityRepository; +use Doctrine\Persistence\ManagerRegistry; +use Doctrine\Persistence\ObjectRepository; +use UnexpectedValueException; -class GenderRepository extends EntityRepository {} +class GenderRepository extends ServiceEntityRepository { + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Gender::class); + } +} diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php index 17549550f..c8f9cf455 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php @@ -94,7 +94,7 @@ class PersonDocGenNormalizer implements 'age' => (int) $person->getAge(), 'birthdate' => $this->normalizer->normalize($person->getBirthdate(), $format, $dateContext), 'deathdate' => $this->normalizer->normalize($person->getDeathdate(), $format, $dateContext), - 'gender' => $this$this->translator->trans($person->getGender()), + 'gender' => $this->translator->trans($person->getGender()), 'maritalStatus' => null !== ($ms = $person->getMaritalStatus()) ? $this->translatableStringHelper->localize($ms->getName()) : '', 'maritalStatusDate' => $this->normalizer->normalize($person->getMaritalStatusDate(), $format, $dateContext), 'maritalStatusComment' => $this->normalizer->normalize($person->getMaritalStatusComment(), $format, $dateContext),