From 592e73030e751372f8f70c8aa68983ff6ef6b573 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Wed, 25 Nov 2020 20:53:06 +1100 Subject: [PATCH] dev/drupal#149 Override sessionStart function for Drupal8 using appropriate session functions Use Drupal Session service and don't worry about calling migrate --- CRM/Utils/System/Drupal8.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CRM/Utils/System/Drupal8.php b/CRM/Utils/System/Drupal8.php index fa6d8ac926..deb80cb60e 100644 --- a/CRM/Utils/System/Drupal8.php +++ b/CRM/Utils/System/Drupal8.php @@ -835,4 +835,16 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { return ['ufAccessURL' => \Drupal\Core\Url::fromRoute('user.admin_permissions')->toString()]; } + /** + * Start a new session. + */ + public function sessionStart() { + if (\Drupal::hasContainer()) { + $session = \Drupal::service('session'); + if (!$session->isStarted()) { + $session->start(); + } + } + } + } -- 2.25.1