Issue #2003630 by ebeyrent, alexander.ilivanov: Replace drupal_container() with Drupal::service() in the entity_reference() module.