From ff7c58e2a364fcbfa672e4ad244c717c698f125f Mon Sep 17 00:00:00 2001 From: breakone Date: Wed, 17 Jul 2024 15:46:50 +0200 Subject: [PATCH 1/2] [bugfix] fix definitionId type in ImportRowMessage --- src/DataDefinitionsBundle/Messenger/ImportRowMessage.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DataDefinitionsBundle/Messenger/ImportRowMessage.php b/src/DataDefinitionsBundle/Messenger/ImportRowMessage.php index fc0f6b19..40e3b2b4 100644 --- a/src/DataDefinitionsBundle/Messenger/ImportRowMessage.php +++ b/src/DataDefinitionsBundle/Messenger/ImportRowMessage.php @@ -18,18 +18,18 @@ class ImportRowMessage { - private int $definitionId; + private int|string $definitionId; private array $data; private array $params; - public function __construct(int $definitionId, array $data, array $params) + public function __construct(int|string $definitionId, array $data, array $params) { $this->definitionId = $definitionId; $this->data = $data; $this->params = $params; } - public function getDefinitionId(): int + public function getDefinitionId(): int|string { return $this->definitionId; } From 8b5011eb112683e77496370189cdfedcfaa46e25 Mon Sep 17 00:00:00 2001 From: breakone Date: Wed, 17 Jul 2024 15:55:39 +0200 Subject: [PATCH 2/2] [bugfix] fix definitionId type in ExportDefinition --- src/DataDefinitionsBundle/Model/ExportDefinition.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DataDefinitionsBundle/Model/ExportDefinition.php b/src/DataDefinitionsBundle/Model/ExportDefinition.php index 557a4760..cde74a77 100644 --- a/src/DataDefinitionsBundle/Model/ExportDefinition.php +++ b/src/DataDefinitionsBundle/Model/ExportDefinition.php @@ -36,7 +36,7 @@ class ExportDefinition extends AbstractDataDefinition implements ExportDefinitio */ public $fetchUnpublished = false; - public static function getById(int $name) + public static function getById(int|string $name) { return static::getByName($name); } @@ -44,7 +44,7 @@ public static function getById(int $name) public static function getByName($id) { $definitionEntry = new ExportDefinition(); - $definitionEntry->setId((int)$id); + $definitionEntry->setId($id); /** * @var \Instride\Bundle\DataDefinitionsBundle\Model\ExportDefinition\Dao|\Instride\Bundle\DataDefinitionsBundle\Model\ImportDefinition\Dao */