From 903af28bc37ace422e4137d174537f6d23604fe3 Mon Sep 17 00:00:00 2001 From: nruest Date: Mon, 10 Jun 2024 11:54:56 -0400 Subject: [PATCH] Update to use filehash 3.x. - Resolves #21 --- composer.json | 2 +- src/FixityCheckService.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 7639c05..bd8e6f9 100644 --- a/composer.json +++ b/composer.json @@ -3,6 +3,6 @@ "type": "drupal-module", "license": "GPL-2.0-or-later", "require": { - "drupal/filehash": "^2.0" + "drupal/filehash": "^3.0" } } diff --git a/src/FixityCheckService.php b/src/FixityCheckService.php index ecdcee1..ca2d641 100644 --- a/src/FixityCheckService.php +++ b/src/FixityCheckService.php @@ -223,7 +223,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;