From 5b5470c259d21a146a60a4f7f8e1044548441900 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Tue, 20 Sep 2022 17:12:41 +0200 Subject: [PATCH 1/3] add logger to make prod feedback debug easier --- src/Bundle/ChillMainBundle/Controller/ExportController.php | 6 ++++++ src/Bundle/ChillMainBundle/Export/ExportManager.php | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Controller/ExportController.php b/src/Bundle/ChillMainBundle/Controller/ExportController.php index a7404b879..aba48474f 100644 --- a/src/Bundle/ChillMainBundle/Controller/ExportController.php +++ b/src/Bundle/ChillMainBundle/Controller/ExportController.php @@ -443,6 +443,12 @@ class ExportController extends AbstractController } $rawData = unserialize($serialized); + + $this->logger->notice('[export] choices for an export unserialized', [ + 'key' => $key, + 'rawData' => json_encode($rawData) + ]); + $alias = $rawData['alias']; $formCenters = $this->createCreateFormExport($alias, 'generate_centers'); diff --git a/src/Bundle/ChillMainBundle/Export/ExportManager.php b/src/Bundle/ChillMainBundle/Export/ExportManager.php index ed24f1661..dee69237f 100644 --- a/src/Bundle/ChillMainBundle/Export/ExportManager.php +++ b/src/Bundle/ChillMainBundle/Export/ExportManager.php @@ -277,15 +277,17 @@ class ExportManager //handle aggregators $this->handleAggregators($export, $query, $data[ExportType::AGGREGATOR_KEY], $centers); - $this->logger->debug('current query is ' . $query->getDQL(), [ - 'class' => self::class, 'function' => __FUNCTION__, + $this->logger->notice('[export] will execute this qb in export', [ + 'dql' => $query->getDQL() ]); + } else { throw new UnexpectedValueException('The method `intiateQuery` should return ' . 'a `\\Doctrine\\ORM\\NativeQuery` or a `Doctrine\\ORM\\QueryBuilder` ' . 'object.'); } + $result = $export->getResult($query, $data[ExportType::EXPORT_KEY]); if (!is_iterable($result)) { From 1386ae66debf1a90f2cb65a068e945583addc6b1 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 27 Sep 2022 15:35:45 +0200 Subject: [PATCH 2/3] centerDispatchResolver added in construct - was missing --- src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php b/src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php index 3df9f261f..f7abd93dd 100644 --- a/src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php +++ b/src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php @@ -41,11 +41,13 @@ class PersonDocumentType extends AbstractType public function __construct( TranslatableStringHelperInterface $translatableStringHelper, ScopeResolverDispatcher $scopeResolverDispatcher, - ParameterBagInterface $parameterBag + ParameterBagInterface $parameterBag, + CenterResolverDispatcher $centerResolverDispatcher ) { $this->translatableStringHelper = $translatableStringHelper; $this->scopeResolverDispatcher = $scopeResolverDispatcher; $this->parameterBag = $parameterBag; + $this->centerResolverDispatcher = $centerResolverDispatcher; } public function buildForm(FormBuilderInterface $builder, array $options) From a91b35298a6a187ff7926b0a182b5b4bdcfbce55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 28 Sep 2022 15:51:11 +0200 Subject: [PATCH 3/3] Do use the old name for the table, as it should exists when migrations are executed sequentially --- .../ChillEventBundle/migrations/Version20160318111334.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillEventBundle/migrations/Version20160318111334.php b/src/Bundle/ChillEventBundle/migrations/Version20160318111334.php index e879f1d29..241003abf 100644 --- a/src/Bundle/ChillEventBundle/migrations/Version20160318111334.php +++ b/src/Bundle/ChillEventBundle/migrations/Version20160318111334.php @@ -126,7 +126,7 @@ class Version20160318111334 extends AbstractMigration $this->addSql('ALTER TABLE chill_event_participation ' . 'ADD CONSTRAINT FK_4E7768AC217BBB47 ' . 'FOREIGN KEY (person_id) ' - . 'REFERENCES chill_person_person(id) ' + . 'REFERENCES Person (id) ' . 'NOT DEFERRABLE INITIALLY IMMEDIATE'); $this->addSql('ALTER TABLE chill_event_participation ' . 'ADD CONSTRAINT FK_4E7768ACD60322AC '