diff --git a/core/lib/Drupal/Core/Entity/EntityDisplayBase.php b/core/lib/Drupal/Core/Entity/EntityDisplayBase.php index 25bf7644d6..ee07817187 100644 --- a/core/lib/Drupal/Core/Entity/EntityDisplayBase.php +++ b/core/lib/Drupal/Core/Entity/EntityDisplayBase.php @@ -114,13 +114,6 @@ abstract class EntityDisplayBase extends ConfigEntityBase implements EntityDispl */ protected $renderer; - /** - * Stores serializable keys which is used in __sleep()/__wakeup(). - * - * @var string[] - */ - protected $serializedKeys; - /** * {@inheritdoc} */ @@ -549,8 +542,8 @@ public function __sleep() { // Keep track of the serialized keys, to avoid calling toArray() again in // __wakeup(). Because of the way __sleep() works, the data has to be // present in the object to be included in the serialized values. - $keys[] = 'serializedKeys'; - $this->serializedKeys = $keys; + $keys[] = '_serializedKeys'; + $this->_serializedKeys = $keys; return $keys; } @@ -560,8 +553,8 @@ public function __sleep() { public function __wakeup() { // Determine what were the properties from toArray() that were saved in // __sleep(). - $keys = $this->serializedKeys; - unset($this->serializedKeys); + $keys = $this->_serializedKeys; + unset($this->_serializedKeys); $values = array_intersect_key(get_object_vars($this), array_flip($keys)); // Run those values through the __construct(), as if they came from a // regular entity load. diff --git a/core/modules/user/src/Entity/User.php b/core/modules/user/src/Entity/User.php index 766b68daea..1e41b11efc 100644 --- a/core/modules/user/src/Entity/User.php +++ b/core/modules/user/src/Entity/User.php @@ -74,8 +74,6 @@ class User extends ContentEntityBase implements UserInterface { * @var \Drupal\user\UserInterface */ protected static $anonymousUser; - // phpcs:disable Drupal.Classes.PropertyDeclaration - public $_skipProtectedUserFieldConstraint; /** * {@inheritdoc}