From 9a4f50472af20eaa985e83b1d4130d98681174d7 Mon Sep 17 00:00:00 2001 From: nobohan Date: Tue, 20 Apr 2021 10:55:45 +0200 Subject: [PATCH] add point type + Address: add Point field : fix dependency injection of the Point type --- .../DependencyInjection/ChillMainExtension.php | 8 ++++++-- .../{Entity => Doctrine/Model}/Point.php | 2 +- .../{Entity => Doctrine/Model}/PointException.php | 2 +- .../ChillMainBundle/Doctrine/Type/PointType.php | 4 ++-- src/Bundle/ChillMainBundle/Entity/Address.php | 15 ++++++++++++++- 5 files changed, 24 insertions(+), 7 deletions(-) rename src/Bundle/ChillMainBundle/{Entity => Doctrine/Model}/Point.php (97%) rename src/Bundle/ChillMainBundle/{Entity => Doctrine/Model}/PointException.php (93%) diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php index ee9608d82..831853611 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php @@ -188,8 +188,12 @@ class ChillMainExtension extends Extension implements PrependExtensionInterface, $container->prependExtensionConfig('doctrine', array( 'dbal' => [ 'types' => [ - 'dateinterval' => \Chill\MainBundle\Doctrine\Type\NativeDateIntervalType::class, - 'json' => \Chill\MainBundle\Doctrine\Type\PointType::class + 'dateinterval' => [ + 'class' => \Chill\MainBundle\Doctrine\Type\NativeDateIntervalType::class + ], + 'point' => [ + 'class' => \Chill\MainBundle\Doctrine\Type\PointType::class + ] ] ] )); diff --git a/src/Bundle/ChillMainBundle/Entity/Point.php b/src/Bundle/ChillMainBundle/Doctrine/Model/Point.php similarity index 97% rename from src/Bundle/ChillMainBundle/Entity/Point.php rename to src/Bundle/ChillMainBundle/Doctrine/Model/Point.php index 528834e42..869c4c3a6 100644 --- a/src/Bundle/ChillMainBundle/Entity/Point.php +++ b/src/Bundle/ChillMainBundle/Doctrine/Model/Point.php @@ -1,6 +1,6 @@ point; + } + + public function setPoint(?Point $point): self + { + $this->point = $point; + + return $this; + } + }