diff --git a/core/lib/Drupal/Core/Controller/ExceptionController.php b/core/lib/Drupal/Core/Controller/ExceptionController.php
index c9a661b..f0bc50b 100644
--- a/core/lib/Drupal/Core/Controller/ExceptionController.php
+++ b/core/lib/Drupal/Core/Controller/ExceptionController.php
@@ -87,8 +87,8 @@ public function on403Html(FlattenException $exception, Request $request) {
     $path = $this->container->get('path.alias_manager')->getSystemPath(config('system.site')->get('page.403'));
     if ($path && $path != $system_path) {
       // Keep old path for reference, and to allow forms to redirect to it.
-      if (!isset($_GET['destination'])) {
-        $_GET['destination'] = $system_path;
+      if (!$request->query->has('destination')) {
+        $request->query->set('destination', $system_path);
       }
 
       $subrequest = Request::create('/' . $path, 'get', array('destination' => $system_path), $request->cookies->all(), array(), $request->server->all());
@@ -154,8 +154,8 @@ public function on404Html(FlattenException $exception, Request $request) {
     $system_path = $request->attributes->get('system_path');
 
     // Keep old path for reference, and to allow forms to redirect to it.
-    if (!isset($_GET['destination'])) {
-      $_GET['destination'] = $system_path;
+    if (!$request->query->has('destination')) {
+      $request->query->set('destination', $system_path);
     }
 
     $path = $this->container->get('path.alias_manager')->getSystemPath(config('system.site')->get('page.404'));
diff --git a/core/lib/Drupal/Core/Mail/PhpMail.php b/core/lib/Drupal/Core/Mail/PhpMail.php
index 580a824..d82d770 100644
--- a/core/lib/Drupal/Core/Mail/PhpMail.php
+++ b/core/lib/Drupal/Core/Mail/PhpMail.php
@@ -71,10 +71,12 @@ public function mail(array $message) {
     // but some MTAs incorrectly replace LF with CRLF. See #234403.
     $mail_headers = join("\n", $mimeheaders);
 
+    $request = \Drupal::request();
+
     // We suppress warnings and notices from mail() because of issues on some
     // hosts. The return value of this method will still indicate whether mail
     // was sent successfully.
-    if (!isset($_SERVER['WINDIR']) && strpos($_SERVER['SERVER_SOFTWARE'], 'Win32') === FALSE) {
+    if (!$request->server->has('WINDIR') && strpos($request->server->get('SERVER_SOFTWARE'), 'Win32') === FALSE) {
       if (isset($message['Return-Path']) && !ini_get('safe_mode')) {
         // On most non-Windows systems, the "-f" option to the sendmail command
         // is used to set the Return-Path. There is no space between -f and
diff --git a/core/lib/Drupal/Core/Utility/SchemaCache.php b/core/lib/Drupal/Core/Utility/SchemaCache.php
index 3c252b1..4e3bdd4 100644
--- a/core/lib/Drupal/Core/Utility/SchemaCache.php
+++ b/core/lib/Drupal/Core/Utility/SchemaCache.php
@@ -18,8 +18,9 @@ class SchemaCache extends CacheArray {
    * Constructs a SchemaCache object.
    */
   public function __construct() {
+    $request = \Drupal::request();
     // Cache by request method.
-    parent::__construct('schema:runtime:' . ($_SERVER['REQUEST_METHOD'] == 'GET'), 'cache', array('schema' => TRUE));
+    parent::__construct('schema:runtime:' . ($request->isMethod('GET')), 'cache', array('schema' => TRUE));
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Utility/ThemeRegistry.php b/core/lib/Drupal/Core/Utility/ThemeRegistry.php
index eb2dd80..7473e70 100644
--- a/core/lib/Drupal/Core/Utility/ThemeRegistry.php
+++ b/core/lib/Drupal/Core/Utility/ThemeRegistry.php
@@ -46,10 +46,12 @@ class ThemeRegistry extends CacheArray {
    *   Whether all modules have already been loaded.
    */
   function __construct($cid, $bin, $tags, $modules_loaded = FALSE) {
+
     $this->cid = $cid;
     $this->bin = $bin;
     $this->tags = $tags;
-    $this->persistable = $modules_loaded && $_SERVER['REQUEST_METHOD'] == 'GET';
+    $request = \Drupal::request();
+    $this->persistable = $modules_loaded && $request->isMethod('GET');
 
     $data = array();
     if ($this->persistable && $cached = cache($this->bin)->get($this->cid)) {
