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.
Some part of the code like here, drupal service is being called try using dependency injection instead of that.
Comment | File | Size | Author |
---|---|---|---|
#6 | dependency_injection_3077852.patch | 2.08 KB | pratik_kamble |
#3 | 3077852-3-dependency.patch | 1.65 KB | Pavan B S |
Comments
Comment #2
Pavan B S CreditAttribution: Pavan B S at Valuebound commentedI will be working on this issue
Comment #3
Pavan B S CreditAttribution: Pavan B S at Valuebound commentedMade changes as suggested please review
Comment #4
pallavisk CreditAttribution: pallavisk at QED42 commentedComment #5
pratik_kambleComment #6
pratik_kamble@pavan-b-s I have reviewed your patch you have added unneeded config_factory variable at line no. 19. Also, no documentation is added to the class variable.
I have attached new patch which contains the Dependency Injection.
Comment #7
pratik_kambleComment #8
ambuj_gupta CreditAttribution: ambuj_gupta at QED42 commentedTested and verified the module after adding the patch created by @pratik_kamble. And it is working as expected.
Comment #9
ambuj_gupta CreditAttribution: ambuj_gupta at QED42 commentedComment #10
Lal_good fix
Comment #11
Lal_Comment #12
Lal_Comment #13
pratik_kamble