drupal_container() is deprecated, and all calls in the block module need to be replaced with Drupal::service(), except for where the module_handler service is requested, which needs to be replaced with Drupal::moduleHandler() (see #1957154: Replace calls to drupal_container()->get('module_handler') service with Drupal::moduleHandler())
This task a part of #2001206: Replace drupal_container() with Drupal::service()
| Comment | File | Size | Author |
|---|---|---|---|
| #34 | replace-drupal-container-injected-34.patch | 5.35 KB | benjy |
| #34 | interdiff.txt | 1.56 KB | benjy |
| #30 | replace-drupal-container-injected-30.patch | 5.31 KB | benjy |
| #30 | replace-drupal-container-2003058-30.patch | 1.89 KB | benjy |
| #30 | interdiff.txt | 5.32 KB | benjy |
Comments
Comment #1
ebeyrent commentedComment #2
ebeyrent commentedComment #3
ebeyrent commentedComment #4
ebeyrent commentedComment #6
ddrozdik commentedComment #8
ddrozdik commentedhm, I will try to find problem and will fix it.
Comment #9
ddrozdik commentedComment #11
smashwini commentedHi,
I have submitted patch of respective issue.
Comment #13
smashwini commentedHi,
Please ignore above patch in #11 comment
Check this one.
Comment #15
smashwini commentedApology. I created patch in wrong way.
Now please review.
Comment #16
smashwini commentedNeed review.
Comment #18
ddrozdik commented@ashwinikumar, please use Drupal::request(); instead Drupal::service()->get('request');
Comment #19
smashwini commentedUpdated. Need review
Comment #21
smashwini commented@DmitryDrozdik I used Drupal::request(); instead Drupal::service()->get('request');
It's only at one place in block module But still test got failed.
Not sure where my patch is lacking.
Need direction.
Comment #22
ddrozdik commentedThis is incorrect way to use, please use Drupal::service('path.alias_manager') for example above, and for all other places.
Comment #22.0
ddrozdik commentedUpdated issue summary.
Comment #23
ddrozdik commentedComment #25
ddrozdik commented#23: 2003058-replace-drupal_container-block-module_23.patch queued for re-testing.
Comment #26
alvar0hurtad0It applyes OK
Comment #27
berdirThat doesn't mean it's fixed. It needs to get RTBC'd and committed first.
Comment #28
alvar0hurtad0Ok, I'm sorry.
I take note for next times.
Than you very much.
Comment #29
benjy commentedWe shouldn't be using \Drupal::service() in OO code, it needs injecting.
Comment #30
benjy commentedRe-roll and a new version with dependencies injected. We're also updating module_exists here, not sure we should be doing it in this patch but I added it anyway.
Comment #31
benjy commented#30: replace-drupal-container-injected-30.patch queued for re-testing.
Comment #32
chx commentedAssigning for review.
Comment #33
tim.plunkettMissing a space
Unicode::strtolower
Comment #34
benjy commentedBoth issues in #33 fixed. Should drupal_strtolower() be marked as deprecated if we're not using it anymore?
Comment #35
tim.plunkettI guess it should.
Comment #36
alexpottCommitted 58d8e35 and pushed to 8.x. Thanks!
Comment #37.0
(not verified) commentedupdate description