Problem/Motivation
As per Drupal best practises. "\Drupal calls should be avoided in classes, use dependency injection instead"
Steps to reproduce
Proposed resolution
Use dependency injection for following files.
Sms.php
UserSettingsForm.php
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | Usedependencyinjection-3358358-13.patch | 7.01 KB | nishant |
| #4 | 3358358-3.patch | 4.78 KB | kaustab_roy |
Issue fork twilio-3358358
Show commands
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
shiv_sharma commentedI am checking this issue
Comment #3
kaustab_roy commentedI have a created a patch, review once with it.
Affected files:
Sms.php
UserSettingsForm.php
Comment #4
kaustab_roy commentedAdded fixed for the controller issue on send test message sms issue in the patch.
sorry i didn't saw it was already assigned to someone.
Kindly review it as well.
Comment #6
nishantComment #8
nishantCreated MR #10, Please review.
Comment #9
shiv_sharma commentedReviewed the PR #06 working fine on drupal.
Drupal 10.0.9
PHP 8.1.16
Comment #10
shashank5563 commented@nishant, can you remove the unused class from UserSettingsForm.php file.
Also, add the Class Constructor description in the file.
Comment #11
nishantWill do
Comment #12
shashank5563 commentedComment #13
nishantCreated Patch. Please review.
Comment #14
nishantComment #16
shashank5563 commentedComment #17
shashank5563 commented