Clean up ModuleListForm a bit

Created on 4 March 2018, over 7 years ago
Updated 26 January 2023, over 2 years ago

Problem/Motivation

The ModuleListForm has dead code and uninjected dependencies and duplicated html in the output. All of this makes it not that pleasant to work with and review.

Proposed resolution

Clean it up whilst not changing the UI at all.

Remaining tasks

User interface changes

None

API changes

Forms are not API.

Data model changes

None

πŸ“Œ Task
Status

Needs work

Version

10.1 ✨

Component
SystemΒ  β†’

Last updated 4 days ago

No maintainer
Created by

πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request β†’ as a guide.

    So the dependency injection part looks like it's already been completed #3143087: Define accessManager property for ModulesListForm β†’ is one point.

    The other parts may still be needed so tagged for issue summary update for this ticket to be rescoped.

    thanks.

  • First commit to issue fork.
  • Merge request !12184Resolve #2949729 "Moduleslistform" β†’ (Open) created by mstrelan
  • πŸ‡¦πŸ‡ΊAustralia mstrelan

    While we're at it, should we add constructor property promotion and autowiring? Have put up an MR with these changes. I started some deprecation bits for passing KeyValueStoreExpirableInterface instead of KeyValueExpirableFactoryInterface but if that's not required I won't bother polishing it. Then we wouldn't need the Autowire attribute either.

  • Pipeline finished with Failed
    3 months ago
    Total: 191s
    #502538
  • πŸ‡¦πŸ‡ΊAustralia mstrelan

    Removed the deprecation bits because as per the IS forms are not API, and I found exactly one contrib module extending this one - https://git.drupalcode.org/project/acquia_migrate/-/blob/1.9.x/src/Form/...

  • Pipeline finished with Failed
    3 months ago
    Total: 794s
    #502541
  • Pipeline finished with Success
    3 months ago
    Total: 670s
    #502548
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Can the summary be updated to include whats being done

  • πŸ‡¦πŸ‡ΊAustralia mstrelan
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Looking at the proposed changes they appear to line up, gotta love autowiring cleaning up so much.

    Replacing

    require_once DRUPAL_ROOT . '/core/includes/install.inc';
        $distribution = drupal_install_profile_distribution_name();

    Definitely feels like something multiple tickets have been trying to get to.

    Nothing stands out.

  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    Reviewed the latest MR - we need to account for the fact that install profiles can now be uninstalled.

  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    I think this is related: https://www.drupal.org/project/drupal/issues/3053832 πŸ“Œ Refactor ModuleListForm Needs work in fact they might be duplicates.

    I had moved the other one to extension api, but now I am second guessing, should this be in the extension system?

    Should there be a separate issue to move the form?

  • πŸ‡¦πŸ‡ΊAustralia mstrelan

    @nicxvan they seem like dupes, haven't looked how much overlap there is.

    Should there be a separate issue to move the form?

    If we move the form do we then also move the route, permission and menu links? I don't think there is a yaml equivalent for these outside of modules. Is there some other issue to facilitate those things? I think probably it needs to stay where it is.

Production build 0.71.5 2024