3

This Drupal 9 site runs a fork of the search_file_attachments module, modified for custom purposes, and for Drupal 9 compatibility.

For some time now, the Available updates report has shown, for this module, the warning "Project not supported: This project is no longer supported, and is no longer available for download. Disabling everything included by this project is strongly recommended!"

I intend to keep running this module as I might any other custom module, and would like Drupal to stop warning about this, on the rationale that this is no longer a contributed module in need of update status monitoring.

I've tried removing the d.o packaging info:

diff --git a/search_api_attachments.info.yml b/search_api_attachments.info.yml
index 2b2d3cf..adec8e7 100644
--- a/search_api_attachments.info.yml
+++ b/search_api_attachments.info.yml
@@ -3,12 +3,7 @@ name: 'Search API Attachments - Custom Fork'
 description: 'Extract and index file fields content.'
 core: 8.x
 core_version_requirement: ^8 || ^9
-package: Search
 configure: search_api_attachments.admin_form
 dependencies:
   - search_api:search_api
 
-# Information added by Drupal.org packaging script on 2020-04-04
-version: '8.x-1.0-beta16-custom-1'
-project: 'search_api_attachments'
-datestamp: 1586010934

I've also tried removing the composer.json file.

Both of these were followed by drush cr and then manually checking for updates with the "Check manually" link on the Available updates report, but the warning persists.

Question: Other than renaming the module (which I assume would solve the problem but is work I'd like to avoid), can I somehow instruct Drupal to stop checking for updates on this module?

1
  • You can also ask for co-maintainership and if the current maintainer isn't responding you can ask to take over the project. Would actually be better to get the D8+ version out instead of keeping it custom IMHO.
    – leymannx
    Commented Jan 6, 2023 at 8:04

1 Answer 1

3

The updates are checked via the core update module. The update.manager service allows a way to alter the list of projects it checks the data from via hook_update_projects_alter. Technically the following should work:

function MODULENAME_update_projects_alter(&$projects) {
  // Hide the forked module from the list.
  unset($projects['search_api_attachments']);
}

Please make sure you replace the MODULENAME with the actual module name where you are implementing this hook.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.