Closed (fixed)
Project:
Taxonomy Access Control Lite
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
12 May 2011 at 21:29 UTC
Updated:
11 May 2026 at 05:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Dave Cohen commentedIf you can point to anything that doesn't adhere to Drupal coding standards, great. If you can submit a patch, even better.
Comment #2
liam morlandThis fixes everything except implementing dependency injection.
Comment #3
mrinalini9 commentedReviewed patch #2, looks good to me.
It applied cleanly and fixed the phpcs issues except the below issues that need to be fixed as well:
Please fix these issues as well.
Thanks!
Comment #4
liam morlandThis patch adds the array type declaration.
Implementing dependency injection is far more complicated. It should to be done in a separate ticket.
Comment #5
schillerm commentedHi, I ran phpcs against patch #4 and got back just dependency injection warnings ..
###############################################
👻️ ~/Documents/Sites/D9.5.0 phpcs --standard=Drupal,DrupalPractice --ignore=PATCHES.txt --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/tac_lite
FILE: /home/user/Documents/Sites/D9.5.0/web/modules/contrib/tac_lite/src/Form/SchemeForm.php
--------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------
98 | WARNING | Vocabulary::loadMultiple calls should be avoided in classes, use dependency injection instead
--------------------------------------------------------------------------------------------------------------
FILE: /home/user/Documents/Sites/D9.5.0/web/modules/contrib/tac_lite/src/Form/ConfigForm.php
---------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------------------
33 | WARNING | Vocabulary::loadMultiple calls should be avoided in classes, use dependency injection instead
89 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
109 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------------------------
FILE: /home/user/Documents/Sites/D9.5.0/web/modules/contrib/tac_lite/src/Form/UserAccessForm.php
---------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
---------------------------------------------------------------------------------------------------------------
40 | WARNING | Vocabulary::loadMultiple calls should be avoided in classes, use dependency injection instead
41 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
63 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
98 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
103 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------------------------
FILE: /home/user/Documents/Sites/D9.5.0/web/modules/contrib/tac_lite/src/Cache/TacLiteGrantsCacheContext.php
------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
78 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
------------------------------------------------------------------------------------------------------------------
Time: 140ms; Memory: 10MB
######################################
If we ignore dependency injection warnings then this gets +1 for RTBC from me.
Comment #6
liam morlandThanks @schillerm. Please switch the status to RTBC.
Created #3395316: Use dependency injection.
Comment #7
liam morlandCoding standards are fixed for 2.0.x in #3359803: Enable testing, add coverage for basic "view" scenario.
Comment #8
schillerm commentedChanging status .. sorry I must have missed #6
Comment #10
liam morlandI have created a merge request with the patch in #4.
Comment #11
schillerm commentedHi, I just tested the new MR!20 with phpcs and i'm getting 0 errors. All good.
Comment #12
liam morlandWith these changes, all checks are passing except cspell and phpstan, which should have their own issues.
Comment #14
vladimirausThanks everyone for contributions.
Merged 🍾