The @file boilerplate has been declared useless and we can now remove it as per coding standards.

#2304909: Relax requirement for @file when using OO Class or Interface per file

CommentFileSizeAuthor
#4 2664316.patch153.31 KBTR
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

longwave created an issue. See original summary.

TR’s picture

These sorts of changes wouldn't annoy me if they took the time to fix core to keep up with the ever-changing standards. There are core coding-standards patches that have been around > 5 YEARS to fix a bunch of these things (I know - I submitted some of them), but getting them committed is harder than getting an entire core module re-write committed. It's the definition of bike-shedding. The fact is that core will NEVER be up to the coding standards and no core committer really cares.

Now in the interest of "saving time" by not requiring an extra line at the top of each file, they force contrib developers to spend hours changing their code again and again, while happily ignoring these things in core. We have almost FOUR HUNDRED files that now have to be changed! And if we don't then the coder module will spit out hundreds of complaints about Ubercart not being compliant with coding standards.

longwave’s picture

The @file directive will be optional so it's not so bad. There is also an initiative to get coding standards fixed in core and checks run against patches to try and avoid this in the future. I just think it's not top of everyone's list of things to do really!

TR’s picture

Status: Active » Needs review
FileSize
153.31 KB

Actually, this is flagged as an ERROR by the coding standards, even though it's supposed to be optional. But now with phpcs and phpcbf, it's not a hard patch to make. So let's try this:

Status: Needs review » Needs work

The last submitted patch, 4: 2664316.patch, failed testing.

TR’s picture

Status: Needs work » Fixed

  • TR committed 4ca95b9 on 8.x-4.x
    Issue #2664316 by TR: Remove @file from object-oriented code
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.