Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
19 Mar 2014 at 21:52 UTC
Updated:
29 Jul 2014 at 23:27 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ianthomas_ukComment #2
ianthomas_ukSome of these still need to be marked @deprecated, I plan to open a separate issue for that.
Comment #3
grom358 commentedUsing Function Replacer Part of Write script to automate replacement of deprecated functions where possible.
I made some manual changes to UrlHelper (change so query parameter is optional for filterQueryParameters and added checkUrl class method). Then applied the following commands.
Comment #4
ianthomas_ukWe shouldn't call \Drupal from OO code - dependencies should be injected so they can be tested, calling \Drupal makes this method silently depend on the Request object.
Instead, we should correct any places that are currently not passing $query and ensure they do. I suggest we split that off into it's own issue so as not to delay conversion of the other functions.
There is no 'checkUrl' function on UrlHelper. This actually wraps two functions,
String::checkPlain(UrlHelper::stripDangerousProtocols($uri));. Again, let's leave this for now.New function replace commands:
I've reviewed the other commands, and they are good.
Comment #5
grom358 commentedComment #6
ianthomas_ukThat patch looks good, except for a couple of comments / test messages that weren't updated, but it catches everything else correctly.
Here's a patch with those small changes.
Comment #7
longwaveLooks good, only the function declarations remain, plus one self-referential comment to drupal_parse_url() that will be removed when the function itself is removed.
Comment #8
alexpott2221695-6-url.patch no longer applies.
Comment #9
ianthomas_ukI have spoken to webchick and she suggested that she would be available to review/commit this next Monday, 31st March. There's little point in rerolling the patch until the weekend, but if there's a patch here on Monday that applies then I'll review it.
Comment #10
saltednutStraight reroll.
Comment #11
saltednutUgh.. patching error. Here's the correct one.
Comment #12
saltednutComment #13
ianthomas_ukLooks good. I've confirmed #11 is a good reroll of #6, which was RTBC.
Comment #15
ianthomas_ukSimple reroll, just conflicting context in the use statements. Diffing this against #11 shows no other changes.
Comment #17
Jalandhar commentedUpdating the patch with reroll. Please review.
Comment #18
ParisLiakos commentedpatch looks ready to me..i only found two really minor nitpicks (full namespace not starting with
\in comments) but i fixed it myself.i grepped core and no calls to those functions remain
Comment #19
catchCommitted/pushed to 8.x, thanks!