What is the equivalent of calling drupal_lookup_path()? drupal_lookup_path() have been remove in Drupal 8. However, I cannot find a way to achieve the same functionality. All, I'm trying to do is to provide Drupal with a path and he is going to look to see if exist, if exist is going to provide me the node id. If does not exist that path he going to give me an error or null/0.

How can I achieve this on Drupal 8?
Drupal 7: 

$path .= drupal_lookup_path('alias', $path);


Drupal 8:

$alias = 
  \Drupal::service('path.alias_manager')
    -&gt;getPathAlias($path);

if (strcmp($alias, $path) == 0) {
  $alias = '';  // No alias was found.
}

$path .= $alias;


Reference Link

8 calls to drupal_lookup_path()


drupal_get_normal_path
drupal_get_path_alias
purl_get_normal_path
rules_condition_path_alias_exists
rules_condition_path_has_alias