Change record status: 
Project: 
Introduced in branch: 
11.4.x
Introduced in version: 
11.4.0
Description: 

The views_add_contextual_links() function has been deprecated.

Use Drupal\views\ContextualLinks::addLinks() instead.

Before

views_add_contextual_links($element, 'view', $view->current_display);

After

use Drupal\views\ContextualLinksHelper;
...
\Drupal::service(ContextualLinksHelper::class)->addLinks($element, 'view', $view->current_display);
Impacts: 
Module developers