Add UI for Editing src/Agent/Remote/Requirements.php

Created on 10 December 2024, 11 days ago

Problem/Motivation

The src/Agent/Remote/Requirements.php file can only be modified directly in the codebase. This limitation makes it difficult for non-developers or site administrators to adjust requirements dynamically without code access. A lack of flexibility increases the risk of errors and reduces accessibility for administrators.

Steps to reproduce

  • Attempt to adjust a requirement by modifying the src/Agent/Remote/Requirements.php file.
  • Observe that no user-friendly interface exists to make these changes dynamically.
  • Notice the difficulty and risks for non-developers in editing code directly.

Proposed resolution

Develop a configuration form in the Drupal administrative interface to manage the requirements dynamically:

  • Display current requirements and values in a tabular format.
  • Provide input fields for editing values with validation to ensure accuracy.
  • Include a "Save" button to persist changes via a custom configuration entity or the state API.

Remaining tasks

  • Create a Form API-based configuration form.
  • Develop a configuration entity to store editable requirements.
  • Integrate dynamic requirement updates using dependency injection.
  • Add validation to ensure data integrity.
  • Implement permissions for UI access.
  • Write tests for the form and its integration with the DRD Agent requirements.

User interface changes

  • Add a new configuration form in the Drupal administrative interface.
  • Include a table listing current requirements with editable fields.
  • Provide help text and documentation for users.
Feature request
Status

Active

Version

4.1

Component

User interface

Created by

🇧🇷Brazil stephencamilo curitiba

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

Comments & Activities

  • Issue created by @stephencamilo
  • 🇩🇪Germany jurgenhaas Gottmadingen

    Why would anyone want to edit requirements? Those are declared by Drupal core or by contrib modules. And they shouldn't be modified, as the declaring instance has a reason to define them.

    Or am I missing something? What's the use case? Can you explore on this a bit, please.

  • 🇧🇷Brazil stephencamilo curitiba

    My main motivation to create this Feature Request is to change the amount of admin users per site.
    Some projects need more than 3.

  • 🇩🇪Germany jurgenhaas Gottmadingen

    Well, I'd say DRD implements the best practice here and if you want to alter that, you could still implement the hook_requirements_alter in a custom module.

Production build 0.71.5 2024