From 3f4af33b1d3a04726e34097173c8d4f90152ba4f Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Tue, 19 Mar 2019 11:19:49 +0000
Subject: [PATCH] Issue #3035350 by claudiu.cristea: Remove usages of
 drupal_static() from field_test.module

---
 .../field/tests/modules/field_test/field_test.entity.inc        | 2 +-
 core/modules/field/tests/modules/field_test/field_test.module   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/modules/field/tests/modules/field_test/field_test.entity.inc b/core/modules/field/tests/modules/field_test/field_test.entity.inc
index f62b3252c644..39fdf516482e 100644
--- a/core/modules/field/tests/modules/field_test/field_test.entity.inc
+++ b/core/modules/field/tests/modules/field_test/field_test.entity.inc
@@ -19,7 +19,7 @@ function field_test_entity_type_alter(array &$entity_types) {
  * Helper function to enable entity translations.
  */
 function field_test_entity_info_translatable($entity_type_id = NULL, $translatable = NULL) {
-  $stored_value = &drupal_static(__FUNCTION__, []);
+  static $stored_value = [];
   if (isset($entity_type_id)) {
     $entity_definition_update_manager = \Drupal::entityDefinitionUpdateManager();
     $entity_type = $entity_definition_update_manager->getEntityType($entity_type_id);
diff --git a/core/modules/field/tests/modules/field_test/field_test.module b/core/modules/field/tests/modules/field_test/field_test.module
index 2c827c2def3f..585fa35c2f28 100644
--- a/core/modules/field/tests/modules/field_test/field_test.module
+++ b/core/modules/field/tests/modules/field_test/field_test.module
@@ -63,7 +63,7 @@
  *   for that key.
  */
 function field_test_memorize($key = NULL, $value = NULL) {
-  $memorize = &drupal_static(__FUNCTION__, NULL);
+  static $memorize;
 
   if (!isset($key)) {
     $return = $memorize;
-- 
GitLab