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.
In #2230907: Split up Utility into one or more services, we moved almost all methods from Utility
to new services. We marked the old methods as deprecated and just forwarded the calls – we should now remove those old methods and update all callers, before we create a stable release.
Comment | File | Size | Author |
---|---|---|---|
#12 | 2776659-12--remove_deprecated_methods--with_others.patch | 768.05 KB | drunken monkey |
|
Comments
Comment #2
drholera CreditAttribution: drholera at Adyax commentedChecking
Comment #3
drholera CreditAttribution: drholera at Adyax commentedSo I've replaced all deprecated
Utility
methods with services analogues. Please look at this patch and say if it makes sense.Comment #5
mpp CreditAttribution: mpp as a volunteer and at AmeXio commentedSee https://www.drupal.org/node/2784849#comment-11533091
Comment #6
drunken monkeyThanks, great start! Seems to be alright so far.
We probably need to still look through all changed files to see whether we can remove any
use
statements now.The larger still remaining task, though, is converting the
\Drupal::service()
calls to proper dependency injection in all classes where this is possible (forms and plugins, mainly).However, I would have waited with this issue for a bit anyways, since we don't want to disrupt too many patches with the change. My bad, I should probably have set the status to "Postponed" from the beginning.
But still, we should be able to use your patch as a starting point, so thanks a lot again!
@ mpp: Would you please not spam every single issue in this queue with that link? Thanks.
Comment #7
mpp CreditAttribution: mpp as a volunteer and at AmeXio commented@drunken_monkey: Sorry you feel "spammed" but as you can see this issue fails on 8.3 but not on (the current) 8.1 so it would seem relevant.
Comment #8
drunken monkeyNote to self:
git grep -P 'Utility::(?!createTextToken|deepCopy|createCombinedId|splitCombinedId|splitPropertyPath)'
Will (have/be able to) tackle this soon.
Comment #9
drunken monkeyShort on time, just posting. Same spiel as in #2268809-7: Use short array syntax in module.
Comment #10
drunken monkeySpotted a few more places with deprecated code and some more PhpStorm code inspection warnings we might as well fix.
Comment #12
drunken monkeyDamn, so close!
This should fix it.
If anyone is still reviewing any of the three patches (#2863736: Create setDataDefinition method in Field class, #2268809: Use short array syntax in module or this one), please comment since I'll commit and create RC once the tests pass here.
Comment #14
drunken monkeyOK, committed.
Thanks again, drholera, for the initial patch!