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.
Problem/Motivation
Subport of #2339219-55: [meta] Finalize URL generation API (naming, docs, deprecation)
Proposed resolution
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#11 | 2346361-11.patch | 12.44 KB | pwolanin |
#11 | increment.txt | 753 bytes | pwolanin |
#7 | 2346361-7.patch | 12.44 KB | pwolanin |
#4 | interdiff.txt | 2.1 KB | dawehner |
#4 | 2346361-4.patch | 17.38 KB | dawehner |
Comments
Comment #1
dawehnerFirst bit, conversions are done in the repo at the same time.
Comment #2
Crell CreditAttribution: Crell commentedSet https to false by default in addOptionsDefault() and this check can go away.
buildQuery() is documented as unneeded as of PHP 5.4, which is now a required version anyway. Per its docblock we can just use http_build_query() directly and eliminate the dependency.
Should this method also enforce legal values? Eg, that absolute and https can only be booleans and nothing else?
Since those methods are internal to one particular implementation this comment is inappropriate on the interface.
Comment #3
alexpottIf you do #2.2 you will need to use the PHP_QUERY_RFC3986 constant.
Comment #4
dawehnerActually not because we handle three cases:
Well, if people add new (non-existing) options and they are not doing anything I am not convinced that it is worth the effort
both in term of more complexity in the code and performance.
Originally I though this would be a great idea, though yeah this is just another level of discussion (do we still want to help the old wrapper etc.) Let's do that in another place, sorry.
Comment #7
pwolanin CreditAttribution: pwolanin commentedLooks like dawehner included changes from the next part of the patch. Let me try to roll this again.
Comment #8
pwolanin CreditAttribution: pwolanin commentedComment #9
pwolanin CreditAttribution: pwolanin commentedre: UrlHelper::buildQuery(), it's not that simple - I have a patch that made it a wrapper on the built-in and it does somewhat different encoding than Drupal core does, so making such a change in this patch would likely generate pointless test fails all over.
see: #2248257: Optimize UrlHelper::buildQuery() to use http_build_query()
Comment #10
Crell CreditAttribution: Crell commented"split up", not splitted.
Otherwise, if we're not fixing UrlHelper here then this seems fine.
Comment #11
pwolanin CreditAttribution: pwolanin commentedok, fixed that code comment.
Comment #12
dawehnerCool
Comment #13
alexpottDurpal :) cheeky.
Nok? I think this is Nor
I think both of these should be fixed on commit. I'm +1 for rtbc.
Comment #14
webchickFixed Alex's nits and committed and pushed to 8.x. Thanks!
Comment #17
webchickSilly testbot, trix are for kids.
Comment #18
xjm