Closed (fixed)
Project:
Drupal core
Version:
8.2.x-dev
Component:
phpunit
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Dec 2015 at 16:25 UTC
Updated:
13 May 2016 at 09:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
neclimdulThis is the minorist of minors. Doesn't affect documentation sites, ides, coverage reports, anything. Just fixing consistency.
Comment #4
dawehnerDo you think this list is still uptodate?
Comment #5
neclimdulWow um... I wrote this? I have no memory of this place...
Seems unlikely it is up to date but I can investigate.
Comment #6
neclimdulSo, after review yes I don't see any additional covers related annotations that are off and these still apply.
There are probably hundreds of @return, @param and other annotations that are off or questionable but I think I left that out of scope because our requirements are unclear and there are varying reasons for the weirdness.
Useful grep for finding at least some of these questionable annotations.
Comment #7
dawehnerWell yeah I agree for now its enough to fix just the instances of
@coversDefaultClassComment #8
neclimdulAre there any actions you can think of blocking this from being RTBC?
Comment #9
dawehnerThose changes look great, but yeah I was wondering whether we could file a CS standard or so.
Comment #10
neclimdulNot sure if there's really a standard around annotation other then the way they currently are phpunit can't resolve or use them so they're broken.
Comment #11
alexpottWe should adjust the \Drupal\Tests\Listeners\DrupalStandardsListener to test for this so we don't introduce regressions. This exists to ensure we don't break coverage reports...
Comment #12
neclimdulSo I dug into it a little and it looks like coverage works without the fully qualified namespace. So really this is just standardizing our usage and bringing our @uses usage in line with PSR-5.
Tests only is the interdiff.
Comment #13
neclimdulComment #15
dawehnerNice work!
Comment #16
alexpottCommitted 6c73dc1 and pushed to 8.1.x and 8.2.x. Thanks!
I decided to commit the initial patch instead of the patch with the test. I was wrong to ask for the test because this would start failing contrib modules for no good reason. This check belongs in coding standards because it is about style and not correctness. And then modules can choose to opt in to the standard when they are ready.
Comment #18
dawehneralex++++++