Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I ran into some issues using PhpStorm to review Drupal code today and I was able to track it down to improperly commented code found in Drupal. In every code block where we refer to an object we need to start the PSR-0 syntax with at "\".
Comment | File | Size | Author |
---|---|---|---|
#1 | 2100329-1.patch | 190.01 KB | cosmicdreams |
Comments
Comment #1
cosmicdreams CreditAttribution: cosmicdreams commentedHere's a patch that shows what I'm saying
Comment #2
Les LimComing from the discussion here:
#1487760: [policy, no patch] Decide on documentation standards for namespaced items
Comment #3
tim.plunketta) This is correct
b) We just did #2053489: Standardize on \Drupal throughout core
RTBC if green.
Comment #4
cosmicdreams CreditAttribution: cosmicdreams commentedNeed to convert params, new patch coming soon.
Comment #5
cosmicdreams CreditAttribution: cosmicdreams commentednope I got the params, nevermind.
Comment #6
dawehner+1
Comment #7
slashrsm CreditAttribution: slashrsm commented+1
Comment #8
dawehner.
Comment #9
mtift+1
Comment #10
andypostthis need avoid commit conflicts tag
Also there could be a new hunks introduced with latest commits
Comment #11
cosmicdreams CreditAttribution: cosmicdreams commentedLet's see if this needs a reroll
Comment #12
cosmicdreams CreditAttribution: cosmicdreams commented#1: 2100329-1.patch queued for re-testing.
Comment #13
andypost@cosmicdreams is there a pattern to quickly grep for? to make sure all places are fixed
Comment #14
cosmicdreams CreditAttribution: cosmicdreams commentedYea, the patterns are :
replace all "@return Drupal\" with @return \Drupal\
replace all "@see Drupal\" with @see \Drupal\
replace all "@param Drupal\" with @param \Drupal\
Comment #15
Les LimAlso these:
replace all "@var Drupal\" with @var \Drupal\
replace all "@throws Drupal\" with @throws \Drupal\
Comment #16
alexpottGetting this in whilst it still applies - we can pick up any stragglers in a followup.
Committed 3cee107 and pushed to 8.x. Thanks!