From 45fcd1ac02fb01a42a3e9b763aa2cf94eb251927 Mon Sep 17 00:00:00 2001 From: Ioannis Igoumenos Date: Sun, 4 May 2025 12:07:50 +0300 Subject: [PATCH] missing changes --- app/composer.json | 6 ++++-- app/src/Model/Table/PetitionsTable.php | 1 + app/src/Model/Table/PipelinesTable.php | 8 ++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/composer.json b/app/composer.json index a77a69354..527fe89b2 100644 --- a/app/composer.json +++ b/app/composer.json @@ -39,7 +39,8 @@ "FileConnector\\": "availableplugins/FileConnector/src/", "PipelineToolkit\\": "availableplugins/PipelineToolkit/src/", "SqlConnector\\": "availableplugins/SqlConnector/src/", - "CoreJob\\": "plugins/CoreJob/src/" + "CoreJob\\": "plugins/CoreJob/src/", + "OrcidSource\\": "plugins/OrcidSource/src/" } }, "autoload-dev": { @@ -54,7 +55,8 @@ "FileConnector\\Test\\": "availableplugins/FileConnector/tests/", "PipelineToolkit\\Test\\": "availableplugins/PipelineToolkit/tests/", "SqlConnector\\Test\\": "availableplugins/SqlConnector/tests/", - "CoreJob\\Test\\": "plugins/CoreJob/tests/" + "CoreJob\\Test\\": "plugins/CoreJob/tests/", + "OrcidSource\\Test\\": "plugins/OrcidSource/tests/" } }, "scripts": { diff --git a/app/src/Model/Table/PetitionsTable.php b/app/src/Model/Table/PetitionsTable.php index 0ef9a2012..43b6b69f7 100644 --- a/app/src/Model/Table/PetitionsTable.php +++ b/app/src/Model/Table/PetitionsTable.php @@ -468,6 +468,7 @@ public function hydrate(int $id) { // of a duplicate identity that was not detected during an earlier step. This will // cause the entire finalization process to fail and rollback. try { + // TODO: We need to take into account if the plugin has been disabled if(method_exists($Plugin, "hydrate")) { // We have "CoreEnroller.AttributeCollectors" but we want "attribute_collector" $pmodel = Inflector::underscore(Inflector::singularize(StringUtilities::pluginModel($step->plugin))); diff --git a/app/src/Model/Table/PipelinesTable.php b/app/src/Model/Table/PipelinesTable.php index 66eb1b112..165d39dd6 100644 --- a/app/src/Model/Table/PipelinesTable.php +++ b/app/src/Model/Table/PipelinesTable.php @@ -1007,8 +1007,8 @@ protected function mapIdentifier(int $typeId, string $identifier): ?int { * @param Pipeline $pipeline Pipeline * @param ExternalIdentitySource $eis External Identity Source * @param ExtIdentitySourceRecord $eisRecord External Identity Source Record - * @param array $eisAttributes Attributes provided by EIS Backend - * @param int $personId For create operations, use this as the target Person ID, if set + * @param array|null $eisAttributes Attributes provided by EIS Backend + * @param int|null $personId For create operations, use this as the target Person ID, if set * @return array 'person': Person object * 'status': 'linked', 'created', 'matched', 'requested' * 'strategy': If status = 'matched', the MatchStrategy @@ -1018,8 +1018,8 @@ protected function obtainPerson( Pipeline $pipeline, ExternalIdentitySource $eis, ExtIdentitySourceRecord $eisRecord, - ?array $eisAttributes, - ?int $personId=null + ?array $eisAttributes = null, + ?int $personId = null ): array { // Shorthand... $sourceKey = $eisRecord->source_key;