From 9836b2de3d6eeed8dda60c2bc5da6e828e12e967 Mon Sep 17 00:00:00 2001 From: Paul Pound Date: Wed, 8 Jan 2025 14:01:55 -0400 Subject: [PATCH] added Ruebots patch for filehash 3 --- composer.json | 2 +- src/FixityCheckService.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 23efa8f..e62db4b 100644 --- a/composer.json +++ b/composer.json @@ -3,6 +3,6 @@ "type": "drupal-module", "license": "GPL-2.0-or-later", "require": { - "drupal/filehash": "^2 || ^3" + "drupal/filehash": "^3.0" } } diff --git a/src/FixityCheckService.php b/src/FixityCheckService.php index 7238272..582386c 100644 --- a/src/FixityCheckService.php +++ b/src/FixityCheckService.php @@ -218,7 +218,7 @@ class FixityCheckService implements FixityCheckServiceInterface { // Assume success until proven untrue. $state = FixityCheck::STATE_MATCHES; // If column is set, only generate that hash. - foreach ($this->filehash->algos() as $column => $algo) { + foreach ($this->filehash->getEnabledAlgorithms() as $column => $algo) { // Nothing to do if the previous checksum value is not known. if (!isset($file->{$column})) { $state = FixityCheck::STATE_NO_CHECKSUM;