Problem/Motivation
Follow up #2729597: [meta] Replace \Drupal with injected services where appropriate in core
Proposed resolution
Replace all of them with IoC injection where possible
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | 3123229-18.patch | 2.99 KB | hardik_patel_12 |
| #11 | 3123229-11.patch | 2.99 KB | hardik_patel_12 |
Comments
Comment #3
kunalgautam commentedComment #4
kunalgautam commentedComment #5
kunalgautam commentedComment #6
junglePer the parent issue, rescoping this to do it for non-test code.
So i have to set this back to NW, sorry for the change in the middle!
Comment #7
hardik_patel_12 commentedReplacing \Drupal::token() with IoC injection for WidgetBase.php file.
Kindly review.
Comment #8
jungle@Hardik_Patel_12, thanks for working on this!
Would be bette not just telling the
__METHOD__, suggestion:__NAMESPACE__ . '\WidgetBase::__construct()Comment #9
jungleThe CR title "widgetBase constructor injecting a token service ($token) as an argument"
widgetBase -> WidgetBase
Comment #10
jungleThe CR:
Add would be better wrapping
\Drupal\Core\Field\WidgetBase::__construct()and$tokenwith the HTML tagcodeComment #11
hardik_patel_12 commentedCR and deprecation message updated.
Comment #14
snehalgaikwad commentedComment #15
snehalgaikwad commentedReplaced \Drupal::token() from two more places.
Comment #16
hardik_patel_12 commentedLast patch failed to apply.
Comment #17
snehalgaikwad commentedComment #18
hardik_patel_12 commentedLast patch failed to apply , re-rolling the patch.