standardize namespace for form classes

Created on 24 October 2016, almost 9 years ago
Updated 25 August 2025, 23 days ago

There are a lot of inconsistencies with where classes are found in modules and components, and form classes in particular.

For example, here are the form classes in taxonomy module:

src/Form/OverviewTerms.php
src/Form/TermDeleteForm.php
src/Form/VocabularyDeleteForm.php
src/Form/VocabularyResetForm.php
src/TermForm.php
src/VocabularyForm.php

Why are the two main entity forms in the top level namespace, but the other forms in a Forms namespace? It makes it confusing when you're looking for something.

I reckon this could be done before D9 by adding new classes and leaving the old ones as empty subclasses, though on the other hand, it creates clutter.

Should also best be done in child issues, one per module or component.

πŸ“Œ Task
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

base system

Created by

πŸ‡¬πŸ‡§United Kingdom joachim

Live updates comments and jobs are added and updated live.
  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

Sign in to follow issues

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

    Thank you for creating this issue to improve Drupal.

    We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

  • πŸ‡¬πŸ‡§United Kingdom joachim

    YES, still relevant!

Production build 0.71.5 2024