- π«π·France andypost
All child issues and related ones are closed, can we close it?
- π«π·France andypost
- π«π·France andypost
- π¬π§United Kingdom catch
I think we still might need issues opening for these:
Url::toRenderArray() β 1 occurrence
Remove the sole usage & mark as deprecated.LinkGenerator::generate() β 28 occurrences
Should be internal.LinkGenerator::generateFromLink() β 3 occurrences
Should be interna - π«π·France andypost
Thank @catch
Filed for #63.1 - it needs opinions about
Url::renderAccess()
which is used in contrib but not in code after π Deprecate Url::toRenderArray() and Url::renderAccess() Fixedand for #63.3 is internal already and only 1 usage π Deprecate LinkGeneratorInterface::generateFromLink() Fixed but it replacable with
generate()
- π«π·France andypost
The
generate()
is already internal via #2606390: mark \Drupal\Core\Utility\LinkGeneratorInterface::generate as internal βSo we can only deprecate
generateFromLink()
via π Deprecate LinkGeneratorInterface::generateFromLink() Fixed as it also internal since #2606392: mark \Drupal\Core\Utility\LinkGeneratorInterface::generatFromLink as internal β - π¬π§United Kingdom catch
Looking through the issue summary again, we might need one more issue (if it doesn't already exist):
Entity::url() and Entity::link() loose cacheability metadata
They should either be deprecated and trigger an errorAnd maybe for this bit:
We throw an exception in ::generate() in case we return a string in a inside a render context.
For link objects add toString() so its renderable in twig
Add Link::toRenderArray() to support using Link objects - π«π·France andypost
Both
::url()
and::link()
on entities are already replaced by::toUrl()
andtoLink()
in #2606398: Add EntityInterface::toUrl() and EntityInterface::toLink() and mark urlInfo(), url() and link() as deprecated βAs I see
generate()
always returnsGeneratedLink
so it should always have cachability metadata
There's alreadytoString()
and\Drupal\Core\Link::toRenderable()
so not sureLink::toRenderArray()
is needed - Status changed to Fixed
almost 2 years ago 9:51am 24 February 2023 - π¬π§United Kingdom catch
Thanks @andypost! Given π Deprecate Url::toRenderArray() and Url::renderAccess() Fixed is RTBC I think we can close this now!
Tried to add issue credit for triage, but a lot of comments here and it's hard for meta/policy issues, so might not be perfect.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Awesome! π€©
Thank you, @andypost! π
- π«π·France andypost
Awesome! Now API looks polished, would be great to start add types to arguments and clean-up routing leftovers
@Wim Leers please comment/help with remaining related bug π Generated url cache context is not correct for relative urls from the UrlGenerator Needs work
Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
almost 2 years ago 9:51pm 12 March 2023 - π«π·France andypost
The last one commited! π Deprecate Url::toRenderArray() and Url::renderAccess() Fixed
- π¬π§United Kingdom catch