diff --git a/core/modules/block/block.module b/core/modules/block/block.module
index cdec2b8..4bcb3fa 100644
--- a/core/modules/block/block.module
+++ b/core/modules/block/block.module
@@ -311,7 +311,7 @@ function _block_get_renderable_region($list = array()) {
   // to other users. We therefore exclude user 1 from block caching.
   $not_cacheable = $GLOBALS['user']->uid == 1 ||
     count(module_implements('node_grants')) ||
-    !in_array($_SERVER['REQUEST_METHOD'], array('GET', 'HEAD'));
+    !\Drupal::request()->isMethodSafe();
 
   foreach ($list as $key => $block) {
     $settings = $block->get('settings');
diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php
index 405fabd..2457d97 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php
@@ -207,9 +207,10 @@ public function save(array $form, array &$form_state) {
    */
   public function delete(array $form, array &$form_state) {
     $destination = array();
-    if (isset($_GET['destination'])) {
+    $query = \Drupal::request()->query;
+    if (!is_null($query->get('destination'))) {
       $destination = drupal_get_destination();
-      unset($_GET['destination']);
+      $query->remove('destination');
     }
     $block = $this->buildEntity($form, $form_state);
     $form_state['redirect'] = array('block/' . $block->id() . '/delete', array('query' => $destination));
diff --git a/core/modules/book/book.module b/core/modules/book/book.module
index 39f08b9..fd02382 100644
--- a/core/modules/book/book.module
+++ b/core/modules/book/book.module
@@ -880,9 +880,10 @@ function book_node_prepare(EntityInterface $node) {
   if (empty($node->book) && (user_access('add content to books') || user_access('administer book outlines'))) {
     $node->book = array();
 
-    if (empty($node->nid) && isset($_GET['parent']) && is_numeric($_GET['parent'])) {
+    $query = \Drupal::request()->query;
+    if (empty($node->nid) && !is_null($query->get('parent')) && is_numeric($query->get('parent'))) {
       // Handle "Add child page" links:
-      $parent = book_link_load($_GET['parent']);
+      $parent = book_link_load($query->get('parent'));
 
       if ($parent && $parent['access']) {
         $node->book['bid'] = $parent['bid'];
