Loading CHANGELOG.md +1 −0 Changes for CHANGELOG.md: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ Changelog - [FIX] Logs : ils étaient recherchés dans la connection orm_default alors qu'ils se trouvent dans la connection destination de l'import/synchro. - [FIX] Ajouts de strtolower/strtoupper() faisant défaut. - [FIX] SQL d'interrogation de la vue différentielle : préfixages oubliés des colonnes de la vue. - [FIX] Prise en compte du caractère facultatif des valeurs par défaut des colonnes d'historique correspondant aux auteurs. 7.3.2 ----- Loading src/UnicaenDbImport/CodeGenerator/Helper/TableHelper.php +19 −11 Changes for src/UnicaenDbImport/CodeGenerator/Helper/TableHelper.php: 19 added lines, 11 removed lines. Original line number Diff line number Diff line Loading @@ -380,14 +380,14 @@ EOT; $sourceCode = null; } $columnsToAdd = [ $createdOnCol, $createdByCol, ]; $valuesToAdd = [ $now, $createdByValue !== null ? $createdByValue : 'NULL', ]; $columnsToAdd = []; $valuesToAdd = []; if ($createdByValue !== null) { $columnsToAdd[] = $createdByCol; $valuesToAdd[] = $createdByValue; } $columnsToAdd[] = $createdOnCol; $valuesToAdd[] = $now; if ($sourceCode !== null) { // si le code de la Source est fourni dans la config, on l'utilise $sourceCode = $this->platform->quoteStringLiteral($sourceCode); Loading Loading @@ -451,9 +451,13 @@ EOT; 'source_id', ); } if ($createdByValue !== null) { array_unshift($destinationColumns, $createdOnCol, $createdByCol, ); } array_unshift($destinationColumns, $createdOnCol, $sourceCodeColumn, ); if ($idColumnStrategy === DestinationInterface::ID_STRATEGY_SEQUENCE || Loading @@ -467,13 +471,17 @@ EOT; $columnNameFormatter = fn(string $columnName) => Synchro::V_DIFF_SRC_COLUMN_PREFIX . strtoupper($columnName); $selectExpressions = array_map($columnNameFormatter, $columns); if (!$sourceIdExistsInColumns) { array_unshift($destinationColumns, array_unshift($selectExpressions, 'source_id', ); } if ($createdByValue !== null) { array_unshift($selectExpressions, $createdByValue, ); } array_unshift($selectExpressions, $now, $createdByValue !== null ? $createdByValue : 'NULL', $sourceCodeColumn, ); if ($idColumnStrategy === DestinationInterface::ID_STRATEGY_SEQUENCE) { Loading src/UnicaenDbImport/Config/ConfigFactory.php +3 −6 Changes for src/UnicaenDbImport/Config/ConfigFactory.php: 3 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -261,18 +261,15 @@ class ConfigFactory */ private function getHistoColumnsValues(): array { try { Assertion::keyExists($this->moduleConfig, $key = 'histo_columns_values'); } catch (AssertionFailedException $e) { throw ConfigException::missingKey($key); } if (array_key_exists($key = 'histo_columns_values', $this->moduleConfig)) { try { Assertion::isArray($this->moduleConfig[$key]); } catch (AssertionFailedException $e) { throw ConfigException::invalidValueForKey($key, 'array'); } } return $this->moduleConfig[$key]; return $this->moduleConfig[$key] ?? []; } /** Loading Loading
CHANGELOG.md +1 −0 Changes for CHANGELOG.md: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ Changelog - [FIX] Logs : ils étaient recherchés dans la connection orm_default alors qu'ils se trouvent dans la connection destination de l'import/synchro. - [FIX] Ajouts de strtolower/strtoupper() faisant défaut. - [FIX] SQL d'interrogation de la vue différentielle : préfixages oubliés des colonnes de la vue. - [FIX] Prise en compte du caractère facultatif des valeurs par défaut des colonnes d'historique correspondant aux auteurs. 7.3.2 ----- Loading
src/UnicaenDbImport/CodeGenerator/Helper/TableHelper.php +19 −11 Changes for src/UnicaenDbImport/CodeGenerator/Helper/TableHelper.php: 19 added lines, 11 removed lines. Original line number Diff line number Diff line Loading @@ -380,14 +380,14 @@ EOT; $sourceCode = null; } $columnsToAdd = [ $createdOnCol, $createdByCol, ]; $valuesToAdd = [ $now, $createdByValue !== null ? $createdByValue : 'NULL', ]; $columnsToAdd = []; $valuesToAdd = []; if ($createdByValue !== null) { $columnsToAdd[] = $createdByCol; $valuesToAdd[] = $createdByValue; } $columnsToAdd[] = $createdOnCol; $valuesToAdd[] = $now; if ($sourceCode !== null) { // si le code de la Source est fourni dans la config, on l'utilise $sourceCode = $this->platform->quoteStringLiteral($sourceCode); Loading Loading @@ -451,9 +451,13 @@ EOT; 'source_id', ); } if ($createdByValue !== null) { array_unshift($destinationColumns, $createdOnCol, $createdByCol, ); } array_unshift($destinationColumns, $createdOnCol, $sourceCodeColumn, ); if ($idColumnStrategy === DestinationInterface::ID_STRATEGY_SEQUENCE || Loading @@ -467,13 +471,17 @@ EOT; $columnNameFormatter = fn(string $columnName) => Synchro::V_DIFF_SRC_COLUMN_PREFIX . strtoupper($columnName); $selectExpressions = array_map($columnNameFormatter, $columns); if (!$sourceIdExistsInColumns) { array_unshift($destinationColumns, array_unshift($selectExpressions, 'source_id', ); } if ($createdByValue !== null) { array_unshift($selectExpressions, $createdByValue, ); } array_unshift($selectExpressions, $now, $createdByValue !== null ? $createdByValue : 'NULL', $sourceCodeColumn, ); if ($idColumnStrategy === DestinationInterface::ID_STRATEGY_SEQUENCE) { Loading
src/UnicaenDbImport/Config/ConfigFactory.php +3 −6 Changes for src/UnicaenDbImport/Config/ConfigFactory.php: 3 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -261,18 +261,15 @@ class ConfigFactory */ private function getHistoColumnsValues(): array { try { Assertion::keyExists($this->moduleConfig, $key = 'histo_columns_values'); } catch (AssertionFailedException $e) { throw ConfigException::missingKey($key); } if (array_key_exists($key = 'histo_columns_values', $this->moduleConfig)) { try { Assertion::isArray($this->moduleConfig[$key]); } catch (AssertionFailedException $e) { throw ConfigException::invalidValueForKey($key, 'array'); } } return $this->moduleConfig[$key]; return $this->moduleConfig[$key] ?? []; } /** Loading