Remove the local_modules source plugin in favor of a configuration option in the drupalorg_jsonapi source

Created on 6 August 2025, 6 days ago

Problem/Motivation

The local_modules source is weird.

It was added hastily because we needed a way to only show locally installed modules, and there was no way to set up source-specific configuration at the time. But it's a strange plugin because it's a decorator that only decorates a single source (drupalorg_jsonapi) and therefore does not really behave like its own source. That's because it's fundamentally a way to add configuration to a plugin that was not, at the time, configurable.

But now that we have the ability to configure sources directly, it's just a troublesome wart that makes maintenance harder.

Proposed resolution

Add a new configuration option to drupalorg_jsonapi called only_installed. This should be a boolean that, if true, only queries drupal.org about modules that are locally installed -- thus fulfilling the same use case as the local_modules source.

Meanwhile, we can remove the local_modules source (or at least deprecate it) if we add an update path that migrates it to a setting of the drupalorg_jsonapi source (if enabled), along with any Project Browser blocks which use the local_modules source.

πŸ“Œ Task
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024