Loading
fix: #3636584 Status report never warns when HTTrack, tar or gzip are missing
Closes https://www.drupal.org/project/earkiv/issues/3636584
What this changes
Hooks::requirements()readsdefault_archiver_pluginanddefault_storage_plugin, the setting names the settings form saves. Before, it readarchiverandstorage, which do not exist, so no plugin requirements were checked andearkiv_requirements()returned an empty array.HTTrackArchiver::requirements()treats an empty result fromshell_exec()as a missing command for httrack, tar and gzip. Before, a missing tar or gzip returned NULL andstr_contains(NULL, ...)was FALSE, so no error was reported.- The three command checks discard stderr (
2>/dev/null), so the shell message for a missing command does not end up in the web server log on every status report. Hooks::create()passesconfig.factoryinstead oflanguage_manager. The class is autowired as a service today, so this was not hit.
The deprecated REQUIREMENT_* constants are left as they are; they are replaced in #3597448 (!1 (closed)).
Testing
In DDEV on Drupal 11.4:
earkiv_requirements("runtime")with all commands installed: HTTrack shown as info with its version.- Same with
PATHpointing to an empty directory: httrack, tar and gzip all reported as errors, and no shell messages on stderr. drush core:requirementsand the status report page at/admin/reports/statusshow the HTTrack row without errors.Hooks::create()gets the config factory.
AI-Generated: Yes (Used Claude Code to find the bugs, write the fix, test it in DDEV and draft this description.)