By andypost on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
10.1.x
Introduced in version:
10.1.0
Issue links:
Description:
Methods Url::toRenderArray() and Url::renderAccess() (trusted callback) are deprecated
Both methods are used very infrequently in contributed code. To replace usage, you can usually just call $url->access()
Before
if ($url->renderAccess($url->toRenderArray())) {
return Link::fromTextAndUrl($view_mode, $url)->toString();
}
After
if ($url->access()) {
return Link::fromTextAndUrl($view_mode, $url)->toString();
}
Impacts:
Module developers