diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/relationship/NodeTermData.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/relationship/NodeTermData.php
index dd52645..5076813 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/relationship/NodeTermData.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/relationship/NodeTermData.php
@@ -95,7 +95,7 @@ public function query() {
       $def['table formula'] = $query;
     }
 
-    $join = drupal_container()->get('plugin.manager.views.join')->createInstance('standard', $def);
+    $join = \Drupal::service('plugin.manager.views.join')->createInstance('standard', $def);
 
     // use a short alias for this:
     $alias = $def['table'] . '_' . $this->table;
diff --git a/core/modules/taxonomy/taxonomy.pages.inc b/core/modules/taxonomy/taxonomy.pages.inc
index 72c1fb1..e42f56c 100644
--- a/core/modules/taxonomy/taxonomy.pages.inc
+++ b/core/modules/taxonomy/taxonomy.pages.inc
@@ -103,7 +103,7 @@ function taxonomy_term_feed(Term $term) {
 function taxonomy_autocomplete($field_name) {
   // A comma-separated list of term names entered in the autocomplete form
   // element. Only the last term is used for autocompletion.
-  $tags_typed = drupal_container()->get('request')->query->get('q');
+  $tags_typed = Drupal::service('request')->query->get('q');
 
   // Make sure the field exists and is a taxonomy field.
   if (!($field = field_info_field($field_name)) || $field['type'] !== 'taxonomy_term_reference') {
