Make @file optional for *.module and *.install files

Created on 23 January 2016, about 9 years ago
Updated 30 January 2025, 2 months ago

A follow up for #2304909: Relax requirement for @file when using OO Class or Interface per file .

Problem/Motivation

A considerable portion of non OO files has useless @file comment.

Just a few examples:

Proposed change

Either make the @file comment optional or change the comment pattern for *.module and *.install files.

Feature request
Status

Active

Component

Coding Standards

Created by

🇷🇺Russia Chi

Live updates comments and jobs are added and updated live.
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.

  • 🇧🇪Belgium borisson_ Mechelen, 🇧🇪

    I agree that for seasoned Drupal developers these docblocks are redundant, but it still makes sense for junior developers, or developers coming from other platforms to provide context. I can imagine a Symfony developer that is doing a Drupal 8 project being confused by these weird ".module" and ".install" file extensions. It are exactly these files that contain our odd hook-based drupalisms, and a single line of documentation goes a long way to inform people what this is all about.

    With the current way core seems to be going in trying to remove most of these files, by making hooks annotation based, it looks like the argument is start to lose value?

  • 🇳🇿New Zealand quietone

    There are only 86 .module files left, so this is mostly about .install files. I am not a fan of the extra documentation in the example for .install in #6. If we wanted to do something like that I would rather it just be @see to other API documentation.

Production build 0.71.5 2024