Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
As of #1875086: Improve DX of drupal_container()->get() the drupal_container() function has been replaced. This is a meta issue to track issues for updating all of the individual use cases.
Comment | File | Size | Author |
---|---|---|---|
#3 | 1938334.patch | 247.22 KB | amateescu |
Comments
Comment #1
DamienMcKennaFirst new sub-issue: #1938338: Replace drupal_container() in Configuration system
Comment #2
Crell CreditAttribution: Crell commentedEr: #1938030: Replace View's usage of drupal_container->get() with Drupal::service()
Comment #3
amateescu CreditAttribution: amateescu commentedDo we really need a meta issue for a simple regexp?
Comment #4
dawehner-1 to replace everything in one go.
One reason is that modules want to provide their own services see the issue in comment #2.
This seems to be a good splitable novice issue, sorry :(
Comment #5
amateescu CreditAttribution: amateescu commentedAnd they can do so in followup issues. While moving procedural forms to classes and menu items to the new router are indeed good splitable issues, this one will be a huge waste of testbot and committers time.
Comment #6
BerdirHm. What about first converting the ones that will get a specific method in #1937600: Determine what services to register in the new Drupal class and then do the remaining ones here?
Comment #7
amateescu CreditAttribution: amateescu commentedThat sounds better.
Comment #8
xjm@amateescu, past experience shows that it's the large, monolithic patches that are a waste of reviewers' and committers' time. Simple string replaces that touch hundreds of files break everything and tend to stall for months or years. Incremental issues with a reasonable scope are less disruptive to review, maintain, and commit. We've seen this time and again.
Comment #9
salvisI'm proposing to #1957804: Add a nothrow option to Drupal::service(), which will make some of the required updates easier.
Comment #10
ddrozdik CreditAttribution: ddrozdik commentedSome work in this direction has already been made here #2001206: Replace drupal_container() with Drupal::service()
Comment #11
webchickSeems like this is a dupe.