Closed (fixed)
Project:
Invite
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
19 Apr 2022 at 22:14 UTC
Updated:
6 May 2022 at 04:39 UTC
Jump to comment: Most recent
Currently in the Invite running the phpcs there are a lot of error related to Dependency Injection.
In order to follow the best practice we need to fix them
FILE: invite/src/ParamConverter/InviteParamConverter.php
------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------
27 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
------------------------------------------------------------------------------------------------------
FILE: invite/src/Form/InviteTypeForm.php
---------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------
78 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------
FILE: invite/modules/invite_by_email/src/Form/InviteByEmailBlockForm.php
----------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------
37 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
60 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------------------------------
FILE: invite/modules/invite_link/src/Plugin/Block/InviteLinkBlock.php
-------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------
25 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-------------------------------------------------------------------------------------------------------------------Run phpcs with best practice in the Invite
Fix all of them using dependency injection instead of Drupal:: classes.
https://www.hashbangcode.com/article/drupal-9-introduction-services-and-...
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
renatog commentedComment #3
renatog commentedComment #4
karanpagare commentedComment #6
karanpagare commentedfixed dependency injection issues
Comment #7
ruturaj chaubeyCoding standards relates to Dependency Injection have been applied. Moving to RTBC.
Comment #8
renatog commentedThank you so much for your contribution team
Comment #10
renatog commentedCommitted to the 2.0.x-dev branch Thanks everyone