From 71f3a3403c75b1bc9cd686f01981b66294f0677a Mon Sep 17 00:00:00 2001 From: nobohan Date: Tue, 22 Feb 2022 12:12:53 +0100 Subject: [PATCH] php code fix for Enfant Confie --- src/Bundle/ChillMainBundle/ChillMainBundle.php | 1 - .../Templating/Entity/ChillEntityRenderExtension.php | 1 + .../Serializer/Normalizer/PersonJsonNormalizer.php | 4 +--- .../ChillPersonBundle/Templating/Entity/PersonRender.php | 1 - 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Bundle/ChillMainBundle/ChillMainBundle.php b/src/Bundle/ChillMainBundle/ChillMainBundle.php index c18e17918..32e075b7f 100644 --- a/src/Bundle/ChillMainBundle/ChillMainBundle.php +++ b/src/Bundle/ChillMainBundle/ChillMainBundle.php @@ -29,7 +29,6 @@ use Chill\MainBundle\Security\ProvideRoleInterface; use Chill\MainBundle\Security\Resolver\CenterResolverInterface; use Chill\MainBundle\Security\Resolver\ScopeResolverInterface; use Chill\MainBundle\Templating\Entity\ChillEntityRenderInterface; -use Chill\MainBundle\Templating\Entity\CompilerPass as RenderEntityCompilerPass; use Chill\MainBundle\Templating\UI\NotificationCounterInterface; use Chill\MainBundle\Workflow\EntityWorkflowHandlerInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; diff --git a/src/Bundle/ChillMainBundle/Templating/Entity/ChillEntityRenderExtension.php b/src/Bundle/ChillMainBundle/Templating/Entity/ChillEntityRenderExtension.php index c7de92208..2081f3d9a 100644 --- a/src/Bundle/ChillMainBundle/Templating/Entity/ChillEntityRenderExtension.php +++ b/src/Bundle/ChillMainBundle/Templating/Entity/ChillEntityRenderExtension.php @@ -74,6 +74,7 @@ class ChillEntityRenderExtension extends AbstractExtension if (null === $entity) { return ''; } + return $this->getRender($entity, $options) ->renderString($entity, $options); } diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php index 7a60c32b4..e51c730fd 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php @@ -31,12 +31,10 @@ use function array_key_exists; /** * Serialize a Person entity. */ -class PersonJsonNormalizer implements PersonJsonNormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PersonJsonNormalizer implements DenormalizerAwareInterface, NormalizerAwareInterface, PersonJsonNormalizerInterface { use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ObjectToPopulateTrait; private CenterResolverManagerInterface $centerResolverManager; diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php index 2815aa41f..11236955c 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php @@ -14,7 +14,6 @@ namespace Chill\PersonBundle\Templating\Entity; use Chill\MainBundle\Templating\Entity\AbstractChillEntityRender; use Chill\PersonBundle\Config\ConfigPersonAltNamesHelper; use Chill\PersonBundle\Entity\Person; -use Chill\PersonBundle\Templating\Entity\PersonRenderInterface; use Symfony\Component\Templating\EngineInterface; use Symfony\Contracts\Translation\TranslatorInterface;