From c381152e90708949d9a2ad367a4df7e0f4de7c7c Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Mon, 27 Jun 2022 14:50:10 +0100
Subject: [PATCH] Issue #2987089 by askibinski, andypost, alexpott: Remove
 views.module's direct use of the _serviceId property

(cherry picked from commit c7dc516fdc18da1eca04a533a0d4fcf7cf803467)
---
 core/modules/views/src/ViewExecutable.php | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/core/modules/views/src/ViewExecutable.php b/core/modules/views/src/ViewExecutable.php
index 3da94957027f..5a7c6307b455 100644
--- a/core/modules/views/src/ViewExecutable.php
+++ b/core/modules/views/src/ViewExecutable.php
@@ -2492,8 +2492,6 @@ public function __sleep() {
     // state during unserialization.
     $this->serializationData = [
       'storage' => $this->storage->id(),
-      'views_data' => $this->viewsData->_serviceId,
-      'route_provider' => $this->routeProvider->_serviceId,
       'current_display' => $this->current_display,
       'args' => $this->args,
       'current_page' => $this->current_page,
@@ -2520,8 +2518,8 @@ public function __wakeup() {
 
       // Attach all necessary services.
       $this->user = \Drupal::currentUser();
-      $this->viewsData = \Drupal::service($this->serializationData['views_data']);
-      $this->routeProvider = \Drupal::service($this->serializationData['route_provider']);
+      $this->viewsData = \Drupal::service('views.views_data');
+      $this->routeProvider = \Drupal::service('router.route_provider');
 
       // Restore the state of this executable.
       if ($request = \Drupal::request()) {
-- 
GitLab