Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
routing system
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
30 Sep 2014 at 19:48 UTC
Updated:
25 Nov 2014 at 21:52 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
larowlanLooks very familiar
Comment #2
xjmDiscussed with @larowlan, @tim.plunkett, and @alexpott. We decided to leave
\Drupal::url()in as a convenience wrapper fornew Url(..)->toString()(which means we are keeping it in 8.x.x) and just update the docs to reference Url.Comment #3
xjmNot a beta blocker then either, though I would encourage us to commit it before beta anyway as it will only be docs. Working on it now.
Comment #4
xjmThe
\Drupal::l()docs were also wrong now, so adding that to scope. This is what I have for now. Time to sleep.Comment #5
xjmComment #6
larowlanwhy remove this hunk?
Comment #7
effulgentsia commentedReverted #6 and merged #2343661-23: Rename l() to _l() and url() to _url(), and document replacements.
Comment #8
gábor hojtsyLooks great! Thanks for clearing it up.
Comment #9
alexpottCommitted 64de978 and pushed to 8.0.x. Thanks!
Comment #11
xjm#6 was because we went back and forth about it and didn't actually come to a consensus as to whether we should recommend using
Url::fromRoute()overnew Url()generally, but not a big deal either way. Thanks everyone!Comment #13
donquixote commentedI don't understand why @param and @return docs were removed from \Drupal::url() and \Drupal::l().
These docs are meant at least 50% for the machine (the IDE, mostly), which can't do anything with the "See \Drupal\Core\Url::fromRoute() for detailed documentation."
The proposed changes in #2363523: Docblock / cleanup in \Drupal will re-introduce the @param and @return, albeit with only a short description, and the "for detailed documentation, see ..." still in place.
The other question is, for url(), why do we refer to \Drupal\Core\Url::fromRoute(), and not to \Drupal\Core\Routing\UrlGeneratorInterface::generateFromRoute(), which is the actual function being called?
More discussion over there, I would say.