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.
Problem/Motivation
The Drupal and DrupalPractice request depency injection
Proposed resolution
Inject objects of type QueryFactory, ModuleHandler and Container
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#15 | 3011482-15.patch | 6.63 KB | idebr |
| |||
#15 | interdiff-14-15.txt | 3.05 KB | idebr |
Comments
Comment #2
thallesHi, Congratulations on the module!
Here is the patch that injects dependencies.
Comment #3
thallesComment #4
amietpatial CreditAttribution: amietpatial as a volunteer and at gai Technologies Pvt Ltd for gai Technologies Pvt Ltd commented@Thalles patch doesn't apply
Comment #5
thallesPlease download the last version of module!
Comment #6
amietpatial CreditAttribution: amietpatial as a volunteer and at gai Technologies Pvt Ltd for gai Technologies Pvt Ltd commentedworking fine
Comment #7
thallesComment #8
BerdirShould say something like "The module handler" and so on.
docblock needs to cover all arguments.
the entity query service is deprecated, this should use entityTypeManager->getStorage('x')->getQuery()
this doesn't make sense, it should inject the actual service instead.
Comment #9
thallesFollow the patch!
Comment #10
thallesComment #12
thallesFollow the patch!
Comment #14
thallesFollow the patch!
Comment #15
idebr CreditAttribution: idebr at ezCompany commentedAttached patch implements the following changes:
__construct()
docblock.use
statements alphabetically for better readability.Comment #17
BerdirThanks.