Change record status: 
Project: 
Introduced in branch: 
10.1.x
Introduced in version: 
10.1.0
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