Task #101625
closed
- Subject changed from Simplify GneralUtility::implodeArrayForUrl to Simplify GeneralUtility::implodeArrayForUrl
Small note/hint:
The current implementation ensures a rawurlencode on values in a recursive manner.
This needs to be carefully checked if replaced with `http_build_query()`.
Maybe it makes sense to add special tests for this, if not already contained. (Not checked).
- Status changed from New to Needs Feedback
There is only one place left, we can deprecate this method? Or we keep it? I don't know if we have a problem keeping this method? Maybe documenting the difference between this method and `http_build_query´ ?
@Benni Mack That method is also used by a few public extensions:
sr_feuser_register
yoast_seo
tt_address
cs_seo
nnhelpers
pw_comments
maps2
recaptcha
mediaoembed
jar_utilities
jumpurl
tt_products
in2publish_core
rn_base
div2007
crawler
Also undecided on whether it should be kept. As far as I can see most usages could be replaced in the extensions, so maybe we should encourage that by deprecating this method.
Hey Garvin,
I would then suggest to just document the native alternative in the methods' comments.
- Status changed from Needs Feedback to Rejected
hey Oliver,
this is not that easy as it seems.
When changing the method's body to
return http_build_query($theArray, $name);
the tests will fail hard
--- Expected
+++ Actual
@@ @@
-'&foo[one]=%E2%88%9A&foo[two]=2'
+'one=%E2%88%9A&two=2'
therefore I suggest leaving the method for the time being until we really don't need it anymore and get rid of it.
as the benefit is so small compared to troubles we can produce for people I am closing this issue.
In an ideal world we could just migrate GU to something nicer but just for moving code around it is not worth the troubles
Makes sense. Thanks for checking and for cleaning up the issues, Georg!
Also available in: Atom
PDF