Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drunken monkey created an issue. See original summary.

drholera’s picture

Checking

drholera’s picture

So I've replaced all deprecated Utility methods with services analogues. Please look at this patch and say if it makes sense.

Status: Needs review » Needs work

The last submitted patch, 3: 2776659_3_utility_deprecated_methods_replace.patch, failed testing.

mpp’s picture

drunken monkey’s picture

Status: Needs work » Postponed

Thanks, 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.

mpp’s picture

@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.

drunken monkey’s picture

Note to self:
git grep -P 'Utility::(?!createTextToken|deepCopy|createCombinedId|splitCombinedId|splitPropertyPath)'

Will (have/be able to) tackle this soon.

drunken monkey’s picture

drunken monkey’s picture

Spotted a few more places with deprecated code and some more PhpStorm code inspection warnings we might as well fix.

Status: Needs review » Needs work

The last submitted patch, 10: 2776659-10--remove_deprecated_methods--with_others.patch, failed testing.

drunken monkey’s picture

Damn, 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.

  • drunken monkey committed edf6840 on 8.x-1.x
    Issue #2776659 by drunken monkey, drholera: Removed the deprecated...
drunken monkey’s picture

Status: Needs review » Fixed

OK, committed.
Thanks again, drholera, for the initial patch!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.