The lock() function found in bootstrap.inc has been marked as depreciated. The code comment instructs that it can be replaced with Drupal::lock().
We should replace every instance of lock() with \Drupal::lock().
Should we also remove the lock function from bootstrap.inc?