In version 3 of the File Hash module, the file duplicate lookup functionality is placed in the same class as the file validation functionality. That makes it unclear how to invoke that functionality from custom modules, whereas the duplicate file lookup was easy to invoke in version 2. So I'm keeping File Hash on version 2 for now.
It'd be nice if version 3 of the module could be updated so the file duplicate lookup functionality was defined in its own service, which would restore ease of invocation from custom modules.
(The use case that concerns me here is literally retrieving the list of duplicate files, not validating files.)
Issue fork filehash-3412404
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mfb@SpaceGoat1701 how about if we move it back to the main FileHash class for backwards-compatibility reasons, rather than creating a new standalone service?
Comment #3
spacegoat1701 commentedI had thought there might have been other reasons for removing the functionality from the main FileHash class. But if not, or if those reasons don't supersede backwards-compatibility in your eyes, then I certainly have no problem with moving the functionality back to the main FileHash service.
Comment #5
mfbThe method simply moved from one class to the other for consolidation purposes, but it seems useful to leave it in the main class both for backwards compatibility and to make clear that it can be used as an "API" method.
Comment #7
mfbComment #8
mfb