Cant find any info on this method being removed in webform or how to fix I am writing a patch for a module that used an old beta or even alpha of webform for drupal 8.

There is a line WebformEntityReferenceItem::getEntityWebformFieldName($node); in the module that errors out saying getEntityWebformFieldName() does not exist and sure enough in Drupal\webform\Plugin\Field\FieldType\WebformEntityReferenceItem the method does not exist.

I checked an older release and the method was there at some point. I've been searching since yesterday but cannot find a workaround or even an answer as to why it was removed. Any ideas?

EDIT

So I managed to get it working, but this certainly seems like the incorrect way to do it. 

$node-&gt;get('webform')-&gt;getValue()[0]['target_id'];

So it seems WebformEntityReferenceItem::getEntityWebformFieldName($node); just gets the webform on the webform node and then grabs its 'target_id' value. 

$webform_field_name = WebformEntityReferenceItem::getEntityWebformFieldName($node);
$webform_id = $node-&gt;$webform_field_name-&gt;target_id;


What I posted in my edit, I do not believe is the correct solution, albeit it is now working. Any suggestions would be appreciated.
The WebformEntityReferenceItem::getEntityWebformFieldName() static method was not removed but it was refactored and moved to the 'webform.entity_reference_manager'service.

Here is an example of showing how to use the service.

/** @var \Drupal\webform\WebformEntityReferenceManagerInterface $entity_reference_manager */
$entity_reference_manager = \Drupal::service('webform.entity_reference_manager');
$field_name = $entity_reference_manager-&gt;getFieldName($node);
...


@see \Drupal\webform\WebformEntityReferenceManager

@see \Drupal\webform\WebformEntityReferenceManagerInterface