Change record status: 
Project: 
Introduced in branch: 
8.0.x
Introduced in version: 
8.0.0-beta16
Description: 

drupal_merge_attached() has been replaced with the static mergeAttachments() method of the BubbleableMetadata class.
Before:

$element['#attached'] = drupal_merge_attached($element['#attached'], $child['#attached']);

After:

$element['#attached'] = BubbleableMetadata::mergeAttachments($element['#attached'], $child['#attached']);
Impacts: 
Module developers