diff --git a/composer.json b/composer.json
index d641469a76..e9309e6a8a 100644
--- a/composer.json
+++ b/composer.json
@@ -22,7 +22,7 @@
         "drupal/coder": "^8.3.10",
         "instaclick/php-webdriver": "^1.4.1",
         "mglaman/phpstan-drupal": "^1.1.21",
-        "mikey179/vfsstream": "^1.6.8",
+        "mikey179/vfsstream": "1.6.x-dev#17d16a8",
         "phpunit/phpunit": "^9.5",
         "phpspec/prophecy-phpunit": "^2",
         "phpstan/extension-installer": "^1.1",
@@ -37,7 +37,8 @@
         "symfony/lock": "^6.1",
         "symfony/browser-kit": "^6.1",
         "symfony/dom-crawler": "^6.1",
-        "easyrdf/easyrdf": "^1.0"
+        "easyrdf/easyrdf": "^1.0",
+        "sirbrillig/phpcs-variable-analysis": "2.x-dev#e9c99cd"
     },
     "replace": {
         "symfony/polyfill-php72": "*",
diff --git a/composer.lock b/composer.lock
index 2539aa9736..395ffdb3d7 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "52ee090aa2c068a39b76ecc45ed1a0f2",
+    "content-hash": "8b337f62aa895a48945afe324fa4a068",
     "packages": [
         {
             "name": "asm89/stack-cors",
@@ -629,16 +629,16 @@
         },
         {
             "name": "egulias/email-validator",
-            "version": "3.1.2",
+            "version": "3.2.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/egulias/EmailValidator.git",
-                "reference": "ee0db30118f661fb166bcffbf5d82032df484697"
+                "reference": "f88dcf4b14af14a98ad96b14b2b317969eab6715"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ee0db30118f661fb166bcffbf5d82032df484697",
-                "reference": "ee0db30118f661fb166bcffbf5d82032df484697",
+                "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/f88dcf4b14af14a98ad96b14b2b317969eab6715",
+                "reference": "f88dcf4b14af14a98ad96b14b2b317969eab6715",
                 "shasum": ""
             },
             "require": {
@@ -685,7 +685,7 @@
             ],
             "support": {
                 "issues": "https://github.com/egulias/EmailValidator/issues",
-                "source": "https://github.com/egulias/EmailValidator/tree/3.1.2"
+                "source": "https://github.com/egulias/EmailValidator/tree/3.2.1"
             },
             "funding": [
                 {
@@ -693,7 +693,7 @@
                     "type": "github"
                 }
             ],
-            "time": "2021-10-11T09:18:27+00:00"
+            "time": "2022-06-18T20:57:19+00:00"
         },
         {
             "name": "guzzlehttp/guzzle",
@@ -4272,16 +4272,16 @@
         },
         {
             "name": "composer/composer",
-            "version": "2.3.5",
+            "version": "2.3.10",
             "source": {
                 "type": "git",
                 "url": "https://github.com/composer/composer.git",
-                "reference": "50c47b1f907cfcdb8f072b88164d22b527557ae1"
+                "reference": "ebac357c0a41359f3981098729042ed6dedc97ba"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/composer/composer/zipball/50c47b1f907cfcdb8f072b88164d22b527557ae1",
-                "reference": "50c47b1f907cfcdb8f072b88164d22b527557ae1",
+                "url": "https://api.github.com/repos/composer/composer/zipball/ebac357c0a41359f3981098729042ed6dedc97ba",
+                "reference": "ebac357c0a41359f3981098729042ed6dedc97ba",
                 "shasum": ""
             },
             "require": {
@@ -4297,7 +4297,7 @@
                 "react/promise": "^2.8",
                 "seld/jsonlint": "^1.4",
                 "seld/phar-utils": "^1.2",
-                "symfony/console": "^5.4.1 || ^6.0",
+                "symfony/console": "^5.4.7 || ^6.0.7",
                 "symfony/filesystem": "^5.4 || ^6.0",
                 "symfony/finder": "^5.4 || ^6.0",
                 "symfony/polyfill-php73": "^1.24",
@@ -4324,6 +4324,11 @@
             "extra": {
                 "branch-alias": {
                     "dev-main": "2.3-dev"
+                },
+                "phpstan": {
+                    "includes": [
+                        "phpstan/rules.neon"
+                    ]
                 }
             },
             "autoload": {
@@ -4357,7 +4362,7 @@
             "support": {
                 "irc": "ircs://irc.libera.chat:6697/composer",
                 "issues": "https://github.com/composer/composer/issues",
-                "source": "https://github.com/composer/composer/tree/2.3.5"
+                "source": "https://github.com/composer/composer/tree/2.3.10"
             },
             "funding": [
                 {
@@ -4373,7 +4378,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2022-04-13T14:43:00+00:00"
+            "time": "2022-07-13T13:48:23+00:00"
         },
         {
             "name": "composer/metadata-minifier",
@@ -5165,16 +5170,16 @@
         },
         {
             "name": "mikey179/vfsstream",
-            "version": "v1.6.10",
+            "version": "v1.6.x-dev",
             "source": {
                 "type": "git",
                 "url": "https://github.com/bovigo/vfsStream.git",
-                "reference": "250c0825537d501e327df879fb3d4cd751933b85"
+                "reference": "17d16a8"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/bovigo/vfsStream/zipball/250c0825537d501e327df879fb3d4cd751933b85",
-                "reference": "250c0825537d501e327df879fb3d4cd751933b85",
+                "url": "https://api.github.com/repos/bovigo/vfsStream/zipball/17d16a8",
+                "reference": "17d16a8",
                 "shasum": ""
             },
             "require": {
@@ -5212,7 +5217,7 @@
                 "source": "https://github.com/bovigo/vfsStream/tree/master",
                 "wiki": "https://github.com/bovigo/vfsStream/wiki"
             },
-            "time": "2021-09-25T08:05:01+00:00"
+            "time": "2022-02-23T02:02:42+00:00"
         },
         {
             "name": "myclabs/deep-copy",
@@ -5810,16 +5815,16 @@
         },
         {
             "name": "phpstan/phpstan",
-            "version": "1.8.1",
+            "version": "1.8.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpstan/phpstan.git",
-                "reference": "8dbba631fa32f4b289404469c2afd6122fd61d67"
+                "reference": "c53312ecc575caf07b0e90dee43883fdf90ca67c"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8dbba631fa32f4b289404469c2afd6122fd61d67",
-                "reference": "8dbba631fa32f4b289404469c2afd6122fd61d67",
+                "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c53312ecc575caf07b0e90dee43883fdf90ca67c",
+                "reference": "c53312ecc575caf07b0e90dee43883fdf90ca67c",
                 "shasum": ""
             },
             "require": {
@@ -5845,7 +5850,7 @@
             "description": "PHPStan - PHP Static Analysis Tool",
             "support": {
                 "issues": "https://github.com/phpstan/phpstan/issues",
-                "source": "https://github.com/phpstan/phpstan/tree/1.8.1"
+                "source": "https://github.com/phpstan/phpstan/tree/1.8.2"
             },
             "funding": [
                 {
@@ -5865,7 +5870,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2022-07-12T16:08:06+00:00"
+            "time": "2022-07-20T09:57:31+00:00"
         },
         {
             "name": "phpunit/php-code-coverage",
@@ -7442,29 +7447,30 @@
         },
         {
             "name": "sirbrillig/phpcs-variable-analysis",
-            "version": "v2.11.3",
+            "version": "2.x-dev",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sirbrillig/phpcs-variable-analysis.git",
-                "reference": "c921498b474212fe4552928bbeb68d70250ce5e8"
+                "reference": "e9c99cd"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/c921498b474212fe4552928bbeb68d70250ce5e8",
-                "reference": "c921498b474212fe4552928bbeb68d70250ce5e8",
+                "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/e9c99cd",
+                "reference": "e9c99cd",
                 "shasum": ""
             },
             "require": {
                 "php": ">=5.4.0",
-                "squizlabs/php_codesniffer": "^3.5"
+                "squizlabs/php_codesniffer": "^3.5.6"
             },
             "require-dev": {
                 "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
-                "limedeck/phpunit-detailed-printer": "^3.1 || ^4.0 || ^5.0",
-                "phpstan/phpstan": "^0.11.8",
-                "phpunit/phpunit": "^5.0 || ^6.5 || ^7.0 || ^8.0",
+                "phpcsstandards/phpcsdevcs": "^1.1",
+                "phpstan/phpstan": "^1.7",
+                "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.5 || ^7.0 || ^8.0 || ^9.0",
                 "sirbrillig/phpcs-import-detection": "^1.1"
             },
+            "default-branch": true,
             "type": "phpcodesniffer-standard",
             "autoload": {
                 "psr-4": {
@@ -7491,7 +7497,7 @@
                 "source": "https://github.com/sirbrillig/phpcs-variable-analysis",
                 "wiki": "https://github.com/sirbrillig/phpcs-variable-analysis/wiki"
             },
-            "time": "2022-02-21T17:01:13+00:00"
+            "time": "2022-06-13T13:49:41+00:00"
         },
         {
             "name": "slevomat/coding-standard",
@@ -8261,7 +8267,9 @@
     "stability-flags": {
         "drupal/core": 20,
         "drupal/core-project-message": 20,
-        "drupal/core-vendor-hardening": 20
+        "drupal/core-vendor-hardening": 20,
+        "mikey179/vfsstream": 20,
+        "sirbrillig/phpcs-variable-analysis": 20
     },
     "prefer-stable": true,
     "prefer-lowest": false,
diff --git a/composer/Metapackage/CoreRecommended/composer.json b/composer/Metapackage/CoreRecommended/composer.json
index 6da7fcbea8..0fffaa9a0e 100644
--- a/composer/Metapackage/CoreRecommended/composer.json
+++ b/composer/Metapackage/CoreRecommended/composer.json
@@ -12,7 +12,7 @@
         "composer/semver": "~3.3.2",
         "doctrine/annotations": "~1.13.2",
         "doctrine/lexer": "~1.2.3",
-        "egulias/email-validator": "~3.1.2",
+        "egulias/email-validator": "~3.2.1",
         "guzzlehttp/guzzle": "~7.4.5",
         "guzzlehttp/promises": "~1.5.1",
         "guzzlehttp/psr7": "~2.4.0",
diff --git a/composer/Metapackage/DevDependencies/composer.json b/composer/Metapackage/DevDependencies/composer.json
index 05bc29a225..1e69d8680d 100644
--- a/composer/Metapackage/DevDependencies/composer.json
+++ b/composer/Metapackage/DevDependencies/composer.json
@@ -16,11 +16,12 @@
         "instaclick/php-webdriver": "^1.4.1",
         "justinrainbow/json-schema": "^5.2",
         "mglaman/phpstan-drupal": "^1.1.21",
-        "mikey179/vfsstream": "^1.6.8",
+        "mikey179/vfsstream": "1.6.x-dev#17d16a8",
         "phpspec/prophecy-phpunit": "^2",
         "phpstan/extension-installer": "^1.1",
         "phpstan/phpstan": "^1.8",
         "phpunit/phpunit": "^9.5",
+        "sirbrillig/phpcs-variable-analysis": "2.x-dev#e9c99cd",
         "symfony/browser-kit": "^6.1",
         "symfony/css-selector": "^6.1",
         "symfony/dom-crawler": "^6.1",
diff --git a/composer/Metapackage/PinnedDevDependencies/composer.json b/composer/Metapackage/PinnedDevDependencies/composer.json
index 05f45b05ca..9f93f84d82 100644
--- a/composer/Metapackage/PinnedDevDependencies/composer.json
+++ b/composer/Metapackage/PinnedDevDependencies/composer.json
@@ -12,7 +12,7 @@
         "behat/mink-browserkit-driver": "v2.1.0",
         "behat/mink-selenium2-driver": "v1.6.0",
         "composer/ca-bundle": "1.3.1",
-        "composer/composer": "2.3.5",
+        "composer/composer": "2.3.10",
         "composer/metadata-minifier": "1.0.0",
         "composer/pcre": "3.0.0",
         "composer/spdx-licenses": "1.5.6",
@@ -24,7 +24,7 @@
         "instaclick/php-webdriver": "1.4.14",
         "justinrainbow/json-schema": "5.2.12",
         "mglaman/phpstan-drupal": "1.1.21",
-        "mikey179/vfsstream": "v1.6.10",
+        "mikey179/vfsstream": "v1.6.x-dev",
         "myclabs/deep-copy": "1.11.0",
         "nikic/php-parser": "v4.13.2",
         "phar-io/manifest": "2.0.3",
@@ -36,7 +36,7 @@
         "phpspec/prophecy-phpunit": "v2.0.1",
         "phpstan/extension-installer": "1.1.0",
         "phpstan/phpdoc-parser": "1.5.1",
-        "phpstan/phpstan": "1.8.1",
+        "phpstan/phpstan": "1.8.2",
         "phpunit/php-code-coverage": "9.2.15",
         "phpunit/php-file-iterator": "3.0.6",
         "phpunit/php-invoker": "3.1.1",
@@ -62,7 +62,7 @@
         "sebastian/version": "3.0.2",
         "seld/jsonlint": "1.9.0",
         "seld/phar-utils": "1.2.0",
-        "sirbrillig/phpcs-variable-analysis": "v2.11.3",
+        "sirbrillig/phpcs-variable-analysis": "2.x-dev",
         "slevomat/coding-standard": "7.2.0",
         "squizlabs/php_codesniffer": "3.6.2",
         "symfony/browser-kit": "v6.1.0",
diff --git a/core/lib/Drupal.php b/core/lib/Drupal.php
index e34cbf7857..4fc2485bfe 100644
--- a/core/lib/Drupal.php
+++ b/core/lib/Drupal.php
@@ -126,7 +126,7 @@ class Drupal {
   /**
    * The currently active container object, or NULL if not initialized yet.
    *
-   * @var \Symfony\Component\DependencyInjection\ContainerInterface|null
+   * @var \Drupal\Component\DependencyInjection\ContainerInterface|null
    */
   protected static $container;
 
@@ -150,7 +150,7 @@ public static function unsetContainer() {
   /**
    * Returns the currently active global container.
    *
-   * @return \Symfony\Component\DependencyInjection\ContainerInterface
+   * @return \Drupal\Component\DependencyInjection\ContainerInterface
    *
    * @throws \Drupal\Core\DependencyInjection\ContainerNotInitializedException
    */
diff --git a/core/lib/Drupal/Component/DependencyInjection/Container.php b/core/lib/Drupal/Component/DependencyInjection/Container.php
index 235cceab41..500ad9086c 100644
--- a/core/lib/Drupal/Component/DependencyInjection/Container.php
+++ b/core/lib/Drupal/Component/DependencyInjection/Container.php
@@ -2,7 +2,6 @@
 
 namespace Drupal\Component\DependencyInjection;
 
-use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\DependencyInjection\Exception\LogicException;
 use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
 use Symfony\Component\DependencyInjection\Exception\RuntimeException;
@@ -46,6 +45,8 @@
  */
 class Container implements ContainerInterface, ResetInterface {
 
+  use ServiceIdHashTrait;
+
   /**
    * The parameters of the container.
    *
@@ -536,10 +537,7 @@ protected function getParameterAlternatives($name) {
   }
 
   /**
-   * Gets all defined service IDs.
-   *
-   * @return array
-   *   An array of all defined service IDs.
+   * {@inheritDoc}
    */
   public function getServiceIds() {
     return array_keys($this->serviceDefinitions + $this->services);
diff --git a/core/lib/Drupal/Component/DependencyInjection/ContainerInterface.php b/core/lib/Drupal/Component/DependencyInjection/ContainerInterface.php
new file mode 100644
index 0000000000..e6c5ea72d4
--- /dev/null
+++ b/core/lib/Drupal/Component/DependencyInjection/ContainerInterface.php
@@ -0,0 +1,42 @@
+<?php
+
+namespace Drupal\Component\DependencyInjection;
+
+use Symfony\Component\DependencyInjection\ContainerInterface as BaseContainerInterface;
+
+/**
+ * The interface for Drupal service container classes.
+ *
+ * This interface extends Symfony's ContainerInterface and adds methods for
+ * managing mappings of instantiated services to its IDs.
+ */
+interface ContainerInterface extends BaseContainerInterface {
+
+  /**
+   * Gets all defined service IDs.
+   *
+   * @return array
+   *   An array of all defined service IDs.
+   */
+  public function getServiceIds();
+
+  /**
+   * Collect a mapping between service to ids.
+   *
+   * @return array
+   *   Service ids keyed by a unique hash.
+   */
+  public function getServiceIdMappings(): array;
+
+  /**
+   * Generate a unique hash for a service object.
+   *
+   * @param object $object
+   *   Object needing a unique hash.
+   *
+   * @return string
+   *   A unique hash identifying the object.
+   */
+  public function generateServiceIdHash(object $object): string;
+
+}
diff --git a/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php b/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php
index 3f3d2455e4..69f7d35ad1 100644
--- a/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php
+++ b/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php
@@ -430,6 +430,7 @@ protected function dumpValue($value) {
     elseif (is_object($value)) {
       // Drupal specific: Instantiated objects have a _serviceId parameter.
       if (isset($value->_serviceId)) {
+        @trigger_error('_serviceId is deprecated in drupal:9.5.0 and is removed from drupal:10.0.0. Use DrupalKernelInterface::getServiceIdMapping() instead. See https://www.drupal.org/node/3292540', E_USER_DEPRECATED);
         return $this->getReferenceCall($value->_serviceId);
       }
       throw new RuntimeException('Unable to dump a service container if a parameter is an object without _serviceId.');
diff --git a/core/lib/Drupal/Component/DependencyInjection/ServiceIdHashTrait.php b/core/lib/Drupal/Component/DependencyInjection/ServiceIdHashTrait.php
new file mode 100644
index 0000000000..d53f9cb650
--- /dev/null
+++ b/core/lib/Drupal/Component/DependencyInjection/ServiceIdHashTrait.php
@@ -0,0 +1,37 @@
+<?php
+
+namespace Drupal\Component\DependencyInjection;
+
+/**
+ * A trait for service id hashing implementations.
+ *
+ * Handles delayed cache tag invalidations.
+ */
+trait ServiceIdHashTrait {
+
+  /**
+   * Implements \Drupal\Component\DependencyInjection\ContainerInterface::getServiceIdMappings()
+   */
+  public function getServiceIdMappings(): array {
+    $mapping = [];
+    foreach ($this->getServiceIds() as $service_id) {
+      if ($this->initialized($service_id) && $service_id !== 'service_container') {
+        $mapping[$this->generateServiceIdHash($this->get($service_id))] = $service_id;
+      }
+    }
+    return $mapping;
+  }
+
+  /**
+   * Implements \Drupal\Component\DependencyInjection\ContainerInterface::generateServiceIdHash()
+   */
+  public function generateServiceIdHash(object $object): string {
+    // Include class name as an additional namespace for the hash since
+    // spl_object_hash's return can be recycled. This still is not a 100%
+    // guarantee to be unique but makes collisions incredibly difficult and even
+    // then the interface would be preserved.
+    // @see https://php.net/spl_object_hash#refsect1-function.spl-object-hash-notes
+    return hash('sha256', get_class($object) . spl_object_hash($object));
+  }
+
+}
diff --git a/core/lib/Drupal/Component/Diff/Engine/DiffEngine.php b/core/lib/Drupal/Component/Diff/Engine/DiffEngine.php
index f8ec05fbbb..eb6f7aafb0 100644
--- a/core/lib/Drupal/Component/Diff/Engine/DiffEngine.php
+++ b/core/lib/Drupal/Component/Diff/Engine/DiffEngine.php
@@ -31,6 +31,16 @@ class DiffEngine {
 
   const MAX_XREF_LENGTH = 10000;
 
+  private array $xchanged;
+  private array $ychanged;
+  private array $xv;
+  private array $yv;
+  private array $xind;
+  private array $yind;
+  private ?array $seq;
+  private ?array $in_seq;
+  private ?int $lcs;
+
   public function diff($from_lines, $to_lines) {
 
     $n_from = sizeof($from_lines);
diff --git a/core/lib/Drupal/Core/Asset/AssetResolver.php b/core/lib/Drupal/Core/Asset/AssetResolver.php
index fd35cbc448..297f97f8c2 100644
--- a/core/lib/Drupal/Core/Asset/AssetResolver.php
+++ b/core/lib/Drupal/Core/Asset/AssetResolver.php
@@ -155,7 +155,7 @@ public function getCssAssets(AttachedAssetsInterface $assets, $optimize) {
     $this->themeManager->alter('css', $css, $assets);
 
     // Sort CSS items, so that they appear in the correct order.
-    uasort($css, 'static::sort');
+    uasort($css, [static::class, 'sort']);
 
     if ($optimize) {
       $css = \Drupal::service('asset.css.collection_optimizer')->optimize($css);
@@ -262,7 +262,7 @@ public function getJsAssets(AttachedAssetsInterface $assets, $optimize) {
       $this->themeManager->alter('js', $javascript, $assets);
 
       // Sort JavaScript assets, so that they appear in the correct order.
-      uasort($javascript, 'static::sort');
+      uasort($javascript, [static::class, 'sort']);
 
       // Prepare the return value: filter JavaScript assets per scope.
       $js_assets_header = [];
diff --git a/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php b/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php
index cd88b24bf7..5df8a51c6e 100644
--- a/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php
+++ b/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php
@@ -36,6 +36,11 @@ class CacheContextsManager {
    */
   protected $contexts;
 
+  /**
+   * The set of valid context tokens.
+   */
+  protected array $validContextTokens;
+
   /**
    * Constructs a CacheContextsManager object.
    *
diff --git a/core/lib/Drupal/Core/Cache/PhpBackend.php b/core/lib/Drupal/Core/Cache/PhpBackend.php
index 85935b0b61..a6b69acfac 100644
--- a/core/lib/Drupal/Core/Cache/PhpBackend.php
+++ b/core/lib/Drupal/Core/Cache/PhpBackend.php
@@ -3,8 +3,9 @@
 namespace Drupal\Core\Cache;
 
 use Drupal\Component\Assertion\Inspector;
-use Drupal\Core\PhpStorage\PhpStorageFactory;
+use Drupal\Component\PhpStorage\PhpStorageInterface;
 use Drupal\Component\Utility\Crypt;
+use Drupal\Core\PhpStorage\PhpStorageFactory;
 
 /**
  * Defines a PHP cache implementation.
@@ -26,6 +27,11 @@ class PhpBackend implements CacheBackendInterface {
    */
   protected $bin;
 
+  /**
+   * The PHP storage.
+   */
+  protected PhpStorageInterface $storage;
+
   /**
    * Array to store cache objects.
    */
diff --git a/core/lib/Drupal/Core/Config/ConfigImporter.php b/core/lib/Drupal/Core/Config/ConfigImporter.php
index 58cc8b9844..e86cc052cb 100644
--- a/core/lib/Drupal/Core/Config/ConfigImporter.php
+++ b/core/lib/Drupal/Core/Config/ConfigImporter.php
@@ -1064,13 +1064,13 @@ public function alreadyImporting() {
    * keep the services used by the importer in sync.
    */
   protected function reInjectMe() {
-    $this->_serviceIds = [];
-    $vars = get_object_vars($this);
-    foreach ($vars as $key => $value) {
-      if (is_object($value) && isset($value->_serviceId)) {
-        $this->$key = \Drupal::service($value->_serviceId);
-      }
-    }
+    // When rebuilding the container,
+    // \Drupal\Core\DrupalKernel::initializeContainer() saves the hashes of the
+    // old container and passes them to the new one. So __sleep() will
+    // recognize the old services and then __wakeup() will restore them from
+    // the new container.
+    $this->__sleep();
+    $this->__wakeup();
   }
 
 }
diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
index 08731ab9d7..6c614097cf 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
@@ -18,6 +18,7 @@
  *
  * @ingroup entity_api
  */
+#[\AllowDynamicProperties]
 abstract class ConfigEntityBase extends EntityBase implements ConfigEntityInterface {
 
   use PluginDependencyTrait {
diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php
index d631a66f97..607c6c334b 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php
@@ -419,7 +419,7 @@ protected function _doCreateFromStorageRecord(array $values, $is_syncing = FALSE
     }
     $data = $this->mapFromStorageRecords([$values]);
     $entity = current($data);
-    $entity->original = clone $entity;
+    $entity->setOriginalDefaultRevision(clone $entity);
     $entity->setSyncing($is_syncing);
     $entity->enforceIsNew();
     $entity->postCreate($this);
@@ -435,7 +435,7 @@ protected function _doCreateFromStorageRecord(array $values, $is_syncing = FALSE
    * {@inheritdoc}
    */
   public function updateFromStorageRecord(ConfigEntityInterface $entity, array $values) {
-    $entity->original = clone $entity;
+    $entity->setOriginalDefaultRevision(clone $entity);
 
     $data = $this->mapFromStorageRecords([$values]);
     $updated_entity = current($data);
diff --git a/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php b/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php
index 889a535a12..3322287c6e 100644
--- a/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php
+++ b/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php
@@ -39,6 +39,16 @@ class QueryFactory implements QueryFactoryInterface, EventSubscriberInterface {
    */
   protected $namespaces;
 
+  /**
+   * The key value factory.
+   */
+  protected KeyValueFactoryInterface $keyValueFactory;
+
+  /**
+   * The configuration manager.
+   */
+  protected ConfigManagerInterface $configManager;
+
   /**
    * Constructs a QueryFactory object.
    *
diff --git a/core/lib/Drupal/Core/CoreServiceProvider.php b/core/lib/Drupal/Core/CoreServiceProvider.php
index 90488703d6..8eb1ec9139 100644
--- a/core/lib/Drupal/Core/CoreServiceProvider.php
+++ b/core/lib/Drupal/Core/CoreServiceProvider.php
@@ -10,7 +10,6 @@
 use Drupal\Core\DependencyInjection\Compiler\DeprecatedServicePass;
 use Drupal\Core\DependencyInjection\Compiler\ContextProvidersPass;
 use Drupal\Core\DependencyInjection\Compiler\ProxyServicesPass;
-use Drupal\Core\DependencyInjection\Compiler\DependencySerializationTraitPass;
 use Drupal\Core\DependencyInjection\Compiler\StackedKernelPass;
 use Drupal\Core\DependencyInjection\Compiler\StackedSessionHandlerPass;
 use Drupal\Core\DependencyInjection\Compiler\RegisterStreamWrappersPass;
@@ -93,7 +92,6 @@ public function register(ContainerBuilder $container) {
     // Register plugin managers.
     $container->addCompilerPass(new PluginManagerPass());
 
-    $container->addCompilerPass(new DependencySerializationTraitPass());
     $container->addCompilerPass(new DeprecatedServicePass());
   }
 
diff --git a/core/lib/Drupal/Core/Database/Query/Condition.php b/core/lib/Drupal/Core/Database/Query/Condition.php
index ad64622303..bdf2afba22 100644
--- a/core/lib/Drupal/Core/Database/Query/Condition.php
+++ b/core/lib/Drupal/Core/Database/Query/Condition.php
@@ -10,6 +10,11 @@
  */
 class Condition implements ConditionInterface, \Countable {
 
+  /**
+   * @var \Drupal\Core\Database\Query\SelectInterface
+   */
+  public $sqlQuery;
+
   /**
    * Provides a map of condition operators to condition operator options.
    */
diff --git a/core/lib/Drupal/Core/Database/Query/Truncate.php b/core/lib/Drupal/Core/Database/Query/Truncate.php
index 66b39644b5..7cfce9cd7d 100644
--- a/core/lib/Drupal/Core/Database/Query/Truncate.php
+++ b/core/lib/Drupal/Core/Database/Query/Truncate.php
@@ -35,20 +35,6 @@ public function __construct(Connection $connection, $table, array $options = [])
     $this->table = $table;
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function compile(Connection $connection, PlaceholderInterface $queryPlaceholder) {
-    return $this->condition->compile($connection, $queryPlaceholder);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function compiled() {
-    return $this->condition->compiled();
-  }
-
   /**
    * Executes the TRUNCATE query.
    *
diff --git a/core/lib/Drupal/Core/DependencyInjection/Compiler/DependencySerializationTraitPass.php b/core/lib/Drupal/Core/DependencyInjection/Compiler/DependencySerializationTraitPass.php
index a0ba7f0225..f0dd68794d 100644
--- a/core/lib/Drupal/Core/DependencyInjection/Compiler/DependencySerializationTraitPass.php
+++ b/core/lib/Drupal/Core/DependencyInjection/Compiler/DependencySerializationTraitPass.php
@@ -8,6 +8,11 @@
 /**
  * Sets the _serviceId property on all services.
  *
+ * @deprecated in drupal:9.5.0 and is removed from drupal:10.0.0. The _serviceId
+ *   property is no longer part of the container. Use
+ *   DrupalKernelInterface::getServiceIdMapping() instead.
+ *
+ * @see https://www.drupal.org/node/3292540
  * @see \Drupal\Core\DependencyInjection\DependencySerializationTrait
  */
 class DependencySerializationTraitPass implements CompilerPassInterface {
@@ -16,35 +21,6 @@ class DependencySerializationTraitPass implements CompilerPassInterface {
    * {@inheritdoc}
    */
   public function process(ContainerBuilder $container) {
-    $decorations = new \SplPriorityQueue();
-    $order = PHP_INT_MAX;
-
-    foreach ($container->getDefinitions() as $service_id => $definition) {
-      // Only add the property to services that are public (as private services
-      // can not be reloaded through Container::get()) and are objects.
-      if (!$definition->hasTag('parameter_service') && $definition->isPublic()) {
-        $definition->setProperty('_serviceId', $service_id);
-      }
-
-      if ($decorated = $definition->getDecoratedService()) {
-        $decorations->insert([$service_id, $definition], [$decorated[2], --$order]);
-      }
-    }
-
-    foreach ($decorations as list($service_id, $definition)) {
-      list($inner, $renamedId) = $definition->getDecoratedService();
-      if (!$renamedId) {
-        $renamedId = $service_id . '.inner';
-      }
-
-      $original = $container->getDefinition($inner);
-      if ($original->isPublic()) {
-        // The old service is renamed.
-        $original->setProperty('_serviceId', $renamedId);
-        // The decorating service takes over the old ID.
-        $definition->setProperty('_serviceId', $inner);
-      }
-    }
   }
 
 }
diff --git a/core/lib/Drupal/Core/DependencyInjection/Container.php b/core/lib/Drupal/Core/DependencyInjection/Container.php
index 5643363316..349261052d 100644
--- a/core/lib/Drupal/Core/DependencyInjection/Container.php
+++ b/core/lib/Drupal/Core/DependencyInjection/Container.php
@@ -9,18 +9,6 @@
  */
 class Container extends DrupalContainer {
 
-  /**
-   * {@inheritdoc}
-   */
-  public function set($id, $service) {
-    parent::set($id, $service);
-
-    // Ensure that the _serviceId property is set on synthetic services as well.
-    if (isset($this->services[$id]) && is_object($this->services[$id]) && !isset($this->services[$id]->_serviceId)) {
-      $this->services[$id]->_serviceId = $id;
-    }
-  }
-
   /**
    * {@inheritdoc}
    */
diff --git a/core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php b/core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php
index 58dfe6d12f..2579d1cade 100644
--- a/core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php
+++ b/core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php
@@ -5,6 +5,8 @@
 
 namespace Drupal\Core\DependencyInjection;
 
+use Drupal\Component\DependencyInjection\ContainerInterface;
+use Drupal\Component\DependencyInjection\ServiceIdHashTrait;
 use Symfony\Component\DependencyInjection\Alias;
 use Symfony\Component\DependencyInjection\ContainerBuilder as SymfonyContainerBuilder;
 use Symfony\Component\DependencyInjection\Container as SymfonyContainer;
@@ -19,7 +21,9 @@
  *
  * @ingroup container
  */
-class ContainerBuilder extends SymfonyContainerBuilder {
+class ContainerBuilder extends SymfonyContainerBuilder implements ContainerInterface {
+
+  use ServiceIdHashTrait;
 
   /**
    * @var \Doctrine\Instantiator\InstantiatorInterface|null
@@ -77,11 +81,6 @@ public function set($id, $service) {
       throw new \InvalidArgumentException("Service ID names must be lowercase: $id");
     }
     SymfonyContainer::set($id, $service);
-
-    // Ensure that the _serviceId property is set on synthetic services as well.
-    if (isset($this->services[$id]) && is_object($this->services[$id]) && !isset($this->services[$id]->_serviceId)) {
-      $this->services[$id]->_serviceId = $id;
-    }
   }
 
   /**
diff --git a/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php b/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php
index c24598689e..a23a2f487a 100644
--- a/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php
+++ b/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php
@@ -3,7 +3,8 @@
 namespace Drupal\Core\DependencyInjection;
 
 use Drupal\Core\Entity\EntityStorageInterface;
-use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\DependencyInjection\ContainerInterface as SymfonyContainerInterface;
+use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
 
 /**
  * Provides dependency injection friendly methods for serialization.
@@ -30,33 +31,50 @@ trait DependencySerializationTrait {
    * {@inheritdoc}
    */
   public function __sleep() {
-    $this->_serviceIds = [];
     $vars = get_object_vars($this);
-    foreach ($vars as $key => $value) {
-      if (is_object($value) && isset($value->_serviceId)) {
-        // If a class member was instantiated by the dependency injection
-        // container, only store its ID so it can be used to get a fresh object
-        // on unserialization.
-        $this->_serviceIds[$key] = $value->_serviceId;
-        unset($vars[$key]);
-      }
-      // Special case the container, which might not have a service ID.
-      elseif ($value instanceof ContainerInterface) {
-        $this->_serviceIds[$key] = 'service_container';
-        unset($vars[$key]);
-      }
-      elseif ($value instanceof EntityStorageInterface) {
-        // If a class member is an entity storage, only store the entity type ID
-        // the storage is for so it can be used to get a fresh object on
-        // unserialization. By doing this we prevent possible memory leaks when
-        // the storage is serialized when it contains a static cache of entity
-        // objects and additionally we ensure that we'll not have multiple
-        // storage objects for the same entity type and therefore prevent
-        // returning different references for the same entity.
-        $this->_entityStorages[$key] = $value->getEntityTypeId();
-        unset($vars[$key]);
+    try {
+      $container = \Drupal::getContainer();
+      $mapping = \Drupal::service('kernel')->getServiceIdMapping();
+      foreach ($vars as $key => $value) {
+        if ($value instanceof EntityStorageInterface) {
+          // If a class member is an entity storage, only store the entity type
+          // ID the storage is for, so it can be used to get a fresh object on
+          // unserialization. By doing this we prevent possible memory leaks
+          // when the storage is serialized and it contains a static cache of
+          // entity objects. Additionally we ensure that we'll not have multiple
+          // storage objects for the same entity type and therefore prevent
+          // returning different references for the same entity.
+          $this->_entityStorages[$key] = $value->getEntityTypeId();
+          unset($vars[$key]);
+        }
+        elseif (is_object($value)) {
+          $service_id = FALSE;
+          // Special case the container.
+          if ($value instanceof SymfonyContainerInterface) {
+            $service_id = 'service_container';
+          }
+          else {
+            $id = $container->generateServiceIdHash($value);
+            if (isset($mapping[$id])) {
+              $service_id = $mapping[$id];
+            }
+          }
+          if ($service_id) {
+            // If a class member was instantiated by the dependency injection
+            // container, only store its ID so it can be used to get a fresh object
+            // on unserialization.
+            $this->_serviceIds[$key] = $service_id;
+            unset($vars[$key]);
+          }
+        }
       }
     }
+    catch (ContainerNotInitializedException $e) {
+      // No container, no problem.
+    }
+    catch (ServiceNotFoundException $e) {
+      // No kernel, very strange, but still no problem.
+    }
 
     return array_keys($vars);
   }
diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index e992b77bce..fe38e3b12b 100644
--- a/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -100,7 +100,7 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface {
   /**
    * Holds the container instance.
    *
-   * @var \Symfony\Component\DependencyInjection\ContainerInterface
+   * @var \Drupal\Component\DependencyInjection\ContainerInterface
    */
   protected $container;
 
@@ -237,6 +237,11 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface {
    */
   protected $root;
 
+  /**
+   * A mapping from service classes to service IDs.
+   */
+  protected $serviceIdMapping = [];
+
   /**
    * Create a DrupalKernel object from a request.
    *
@@ -783,6 +788,32 @@ public function updateModules(array $module_list, array $module_filenames = [])
     }
   }
 
+  /**
+   * Generate a unique hash for a service object.
+   *
+   * @param object $object
+   *   A service object.
+   *
+   * @return string
+   *   A unique hash value.
+   */
+  public static function generateServiceIdHash($object) {
+    // Include class name as an additional namespace for the hash since
+    // spl_object_hash's return can be recycled. This still is not a 100%
+    // guarantee to be unique but makes collisions incredibly difficult and even
+    // then the interface would be preserved.
+    // @see https://php.net/spl_object_hash#refsect1-function.spl-object-hash-notes
+    return hash('sha256', get_class($object) . spl_object_hash($object));
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getServiceIdMapping() {
+    $this->collectServiceIdMapping();
+    return $this->serviceIdMapping;
+  }
+
   /**
    * Returns the container cache key based on the environment.
    *
@@ -828,6 +859,8 @@ protected function initializeContainer() {
       if ($this->container->initialized('current_user')) {
         $current_user_id = $this->container->get('current_user')->id();
       }
+      // Save the current services.
+      $this->collectServiceIdMapping();
 
       // If there is a session, close and save it.
       if ($this->container->initialized('session')) {
@@ -1535,6 +1568,17 @@ protected function addServiceFiles(array $service_yamls) {
     $this->serviceYamls['site'] = array_filter($service_yamls, 'file_exists');
   }
 
+  /**
+   * Collect a mapping between service to ids.
+   */
+  protected function collectServiceIdMapping() {
+    if (isset($this->container)) {
+      foreach ($this->container->getServiceIdMappings() as $hash => $service_id) {
+        $this->serviceIdMapping[$hash] = $service_id;
+      }
+    }
+  }
+
   /**
    * Gets the active install profile.
    *
diff --git a/core/lib/Drupal/Core/DrupalKernelInterface.php b/core/lib/Drupal/Core/DrupalKernelInterface.php
index 28a24006dd..0378dff3e7 100644
--- a/core/lib/Drupal/Core/DrupalKernelInterface.php
+++ b/core/lib/Drupal/Core/DrupalKernelInterface.php
@@ -137,4 +137,9 @@ public function preHandle(Request $request);
    */
   public function loadLegacyIncludes();
 
+  /**
+   * Get a mapping from service hashes to service IDs.
+   */
+  public function getServiceIdMapping();
+
 }
diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php
index 75dd42564b..218817123c 100644
--- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php
@@ -924,6 +924,7 @@ protected function initializeTranslation($langcode) {
     $translation->isDefaultRevision = &$this->isDefaultRevision;
     $translation->enforceRevisionTranslationAffected = &$this->enforceRevisionTranslationAffected;
     $translation->isSyncing = &$this->isSyncing;
+    $translation->original = &$this->original;
 
     return $translation;
   }
@@ -1221,6 +1222,16 @@ public function __clone() {
     $original_revision_id = $this->loadedRevisionId;
     $this->loadedRevisionId = &$original_revision_id;
 
+    // Ensure the original property is actually cloned by overwriting the
+    // original reference with one pointing to a copy of it.
+    $original = $this->original;
+    $this->original = &$original;
+
+    // Ensure the original property is actually cloned by overwriting the
+    // original reference with one pointing to a copy of it.
+    $original = $this->original;
+    $this->original = &$original;
+
     $fields = $this->fields;
     $this->fields = &$fields;
 
@@ -1415,11 +1426,11 @@ public function hasTranslationChanges() {
       return TRUE;
     }
 
-    // $this->original only exists during save. See
+    // The original entity only exists during save. See
     // \Drupal\Core\Entity\EntityStorageBase::save(). If it exists we re-use it
     // here for performance reasons.
     /** @var \Drupal\Core\Entity\ContentEntityBase $original */
-    $original = $this->original ? $this->original : NULL;
+    $original = $this->getOriginalDefaultRevision();
 
     if (!$original) {
       $id = $this->getOriginalId() !== NULL ? $this->getOriginalId() : $this->id();
diff --git a/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
index 17a5d3bfdb..88416776e3 100644
--- a/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
@@ -434,7 +434,7 @@ public function createRevision(RevisionableInterface $entity, $default = TRUE, $
       // defined, the stored version is loaded explicitly. Since the merged
       // revision generated here is not stored anywhere, we need to populate the
       // "original" property manually, so that changes can be properly detected.
-      $new_revision->original = clone $new_revision;
+      $new_revision->setOriginalDefaultRevision(clone $new_revision);
     }
 
     // Eventually mark the new revision as such.
@@ -758,7 +758,7 @@ protected function doPreSave(EntityInterface $entity) {
     if (!$entity->isNew()) {
       // If the ID changed then original can't be loaded, throw an exception
       // in that case.
-      if (empty($entity->original) || $entity->id() != $entity->original->id()) {
+      if (!$entity->getOriginalDefaultRevision() || $entity->id() != $entity->getOriginalDefaultRevision()->id()) {
         throw new EntityStorageException("Update existing '{$this->entityTypeId}' entity while changing the ID is not supported.");
       }
       // Do not allow changing the revision ID when resaving the current
@@ -841,7 +841,7 @@ abstract protected function doDeleteRevisionFieldItems(ContentEntityInterface $r
    */
   protected function invokeTranslationHooks(ContentEntityInterface $entity) {
     $translations = $entity->getTranslationLanguages(FALSE);
-    $original_translations = $entity->original->getTranslationLanguages(FALSE);
+    $original_translations = $entity->getOriginalDefaultRevision()->getTranslationLanguages(FALSE);
     $all_translations = array_keys($translations + $original_translations);
 
     // Notify modules of translation insertion/deletion.
@@ -850,7 +850,7 @@ protected function invokeTranslationHooks(ContentEntityInterface $entity) {
         $this->invokeHook('translation_insert', $entity->getTranslation($langcode));
       }
       elseif (!isset($translations[$langcode]) && isset($original_translations[$langcode])) {
-        $this->invokeHook('translation_delete', $entity->original->getTranslation($langcode));
+        $this->invokeHook('translation_delete', $entity->getOriginalDefaultRevision()->getTranslation($langcode));
       }
     }
   }
@@ -944,10 +944,10 @@ protected function invokeFieldMethod($method, ContentEntityInterface $entity) {
 
     // We need to call the delete method for field items of removed
     // translations.
-    if ($method == 'postSave' && !empty($entity->original)) {
-      $original_langcodes = array_keys($entity->original->getTranslationLanguages());
+    if ($method == 'postSave' && $entity->getOriginalDefaultRevision()) {
+      $original_langcodes = array_keys($entity->getOriginalDefaultRevision()->getTranslationLanguages());
       foreach (array_diff($original_langcodes, $langcodes) as $removed_langcode) {
-        $translation = $entity->original->getTranslation($removed_langcode);
+        $translation = $entity->getOriginalDefaultRevision()->getTranslation($removed_langcode);
         $fields = $translation->getTranslatableFields();
         foreach ($fields as $name => $items) {
           $items->delete();
diff --git a/core/lib/Drupal/Core/Entity/Controller/EntityController.php b/core/lib/Drupal/Core/Entity/Controller/EntityController.php
index 4dd93475fb..dc70185670 100644
--- a/core/lib/Drupal/Core/Entity/Controller/EntityController.php
+++ b/core/lib/Drupal/Core/Entity/Controller/EntityController.php
@@ -62,6 +62,11 @@ class EntityController implements ContainerInjectionInterface {
    */
   protected $renderer;
 
+  /**
+   * The url generator.
+   */
+  protected UrlGeneratorInterface $urlGenerator;
+
   /**
    * Constructs a new EntityController.
    *
diff --git a/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php b/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php
index 3dcffd2cfa..8bb0ecc850 100644
--- a/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php
+++ b/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php
@@ -42,6 +42,7 @@ class EntityFormDisplay extends EntityDisplayBase implements EntityFormDisplayIn
    * {@inheritdoc}
    */
   protected $displayContext = 'form';
+  protected $widgets;
 
   /**
    * Returns the entity_form_display object used to build an entity form.
diff --git a/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php b/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php
index 00800b5839..8eb3272181 100644
--- a/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php
+++ b/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php
@@ -41,6 +41,7 @@ class EntityViewDisplay extends EntityDisplayBase implements EntityViewDisplayIn
    * {@inheritdoc}
    */
   protected $displayContext = 'view';
+  protected $formatters;
 
   /**
    * Returns the display objects used to render a set of entities.
diff --git a/core/lib/Drupal/Core/Entity/EntityBase.php b/core/lib/Drupal/Core/Entity/EntityBase.php
index 44a6734896..b82bddf572 100644
--- a/core/lib/Drupal/Core/Entity/EntityBase.php
+++ b/core/lib/Drupal/Core/Entity/EntityBase.php
@@ -47,6 +47,21 @@ abstract class EntityBase implements EntityInterface {
    */
   protected $typedData;
 
+  /**
+   * The original unchanged entity.
+   *
+   * This property will be set and used during the saving process.
+   *
+   * @var static|null
+   *
+   * @deprecated in drupal:9.5.0 and is removed from drupal:11.0.0. Use
+   *   \Drupal\Core\Entity\EntityInterface::getOriginalDefaultRevision()
+   *   instead.
+   *
+   * @see https://www.drupal.org/node/3295826
+   */
+  public $original;
+
   /**
    * Constructs an Entity object.
    *
@@ -650,4 +665,19 @@ public function getConfigTarget() {
     return $this->uuid();
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function getOriginalDefaultRevision(): ?EntityInterface {
+    return $this->original;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setOriginalDefaultRevision(?EntityInterface $original) {
+    $this->original = $original;
+    return $this;
+  }
+
 }
diff --git a/core/lib/Drupal/Core/Entity/EntityDisplayBase.php b/core/lib/Drupal/Core/Entity/EntityDisplayBase.php
index ee07817187..25bf7644d6 100644
--- a/core/lib/Drupal/Core/Entity/EntityDisplayBase.php
+++ b/core/lib/Drupal/Core/Entity/EntityDisplayBase.php
@@ -114,6 +114,13 @@ abstract class EntityDisplayBase extends ConfigEntityBase implements EntityDispl
    */
   protected $renderer;
 
+  /**
+   * Stores serializable keys which is used in __sleep()/__wakeup().
+   *
+   * @var string[]
+   */
+  protected $serializedKeys;
+
   /**
    * {@inheritdoc}
    */
@@ -542,8 +549,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;
   }
 
@@ -553,8 +560,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/lib/Drupal/Core/Entity/EntityInterface.php b/core/lib/Drupal/Core/Entity/EntityInterface.php
index 80695e9f40..f7488b2c15 100644
--- a/core/lib/Drupal/Core/Entity/EntityInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityInterface.php
@@ -442,4 +442,24 @@ public function getConfigDependencyName();
    */
   public function getConfigTarget();
 
+  /**
+   * Returns the unchanged entity for the default revision.
+   *
+   * This is only available while an entity is being saved.
+   *
+   * @return static|null
+   *   The unchanged entity.
+   */
+  public function getOriginalDefaultRevision(): ?EntityInterface;
+
+  /**
+   * Set the unchanged entity for the default revision.
+   *
+   * @param EntityInterface|null $original
+   *   The unchanged entity.
+   *
+   * @return $this
+   */
+  public function setOriginalDefaultRevision(?EntityInterface $original);
+
 }
diff --git a/core/lib/Drupal/Core/Entity/EntityResolverManager.php b/core/lib/Drupal/Core/Entity/EntityResolverManager.php
index 23fcebdf80..88baec68bd 100644
--- a/core/lib/Drupal/Core/Entity/EntityResolverManager.php
+++ b/core/lib/Drupal/Core/Entity/EntityResolverManager.php
@@ -28,6 +28,13 @@ class EntityResolverManager {
    */
   protected $classResolver;
 
+  /**
+   * The list of all entity types.
+   *
+   * @var \Drupal\Core\Entity\EntityTypeInterface[]
+   */
+  protected ?array $entityTypes;
+
   /**
    * Constructs a new EntityRouteAlterSubscriber.
    *
diff --git a/core/lib/Drupal/Core/Entity/EntityStorageBase.php b/core/lib/Drupal/Core/Entity/EntityStorageBase.php
index d32d8fbca6..8acc79c38a 100644
--- a/core/lib/Drupal/Core/Entity/EntityStorageBase.php
+++ b/core/lib/Drupal/Core/Entity/EntityStorageBase.php
@@ -520,8 +520,8 @@ protected function doPreSave(EntityInterface $entity) {
     }
 
     // Load the original entity, if any.
-    if ($id_exists && !isset($entity->original)) {
-      $entity->original = $this->loadUnchanged($id);
+    if ($id_exists && !$entity->getOriginalDefaultRevision()) {
+      $entity->setOriginalDefaultRevision($this->loadUnchanged($id));
     }
 
     // Allow code to run before saving.
@@ -568,7 +568,7 @@ protected function doPostSave(EntityInterface $entity, $update) {
     // correctly identify the original entity.
     $entity->setOriginalId($entity->id());
 
-    unset($entity->original);
+    $entity->setOriginalDefaultRevision(NULL);
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityUntranslatableFieldsConstraintValidator.php b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityUntranslatableFieldsConstraintValidator.php
index 730e5390cb..08a4a9e914 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityUntranslatableFieldsConstraintValidator.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityUntranslatableFieldsConstraintValidator.php
@@ -96,8 +96,8 @@ public function validate($entity, Constraint $constraint) {
   protected function hasUntranslatableFieldsChanges(ContentEntityInterface $entity) {
     $skip_fields = $this->getFieldsToSkipFromTranslationChangesCheck($entity);
     /** @var \Drupal\Core\Entity\ContentEntityInterface $original */
-    if (isset($entity->original)) {
-      $original = $entity->original;
+    if ($entity->getOriginalDefaultRevision()) {
+      $original = $entity->getOriginalDefaultRevision();
     }
     else {
       $original = $this->entityTypeManager
diff --git a/core/lib/Drupal/Core/Entity/Query/QueryBase.php b/core/lib/Drupal/Core/Entity/Query/QueryBase.php
index 85878aa75c..e07ff552ec 100644
--- a/core/lib/Drupal/Core/Entity/Query/QueryBase.php
+++ b/core/lib/Drupal/Core/Entity/Query/QueryBase.php
@@ -131,6 +131,11 @@ abstract class QueryBase implements QueryInterface {
    */
   protected $namespaces = [];
 
+  /**
+   * Defines how the conditions on the query need to match.
+   */
+  protected string $conjunction;
+
   /**
    * Constructs this object.
    *
diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php
index 289d2a9934..7693dd69c9 100644
--- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php
+++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php
@@ -1293,7 +1293,7 @@ protected function saveToDedicatedTables(ContentEntityInterface $entity, $update
       $vid = $id;
     }
 
-    $original = !empty($entity->original) ? $entity->original : NULL;
+    $original = $entity->getOriginalDefaultRevision();
 
     // Determine which fields should be actually stored.
     $definitions = $this->entityFieldManager->getFieldDefinitions($entity_type, $bundle);
diff --git a/core/lib/Drupal/Core/Entity/entity.api.php b/core/lib/Drupal/Core/Entity/entity.api.php
index deb6a75e29..6122e8719c 100644
--- a/core/lib/Drupal/Core/Entity/entity.api.php
+++ b/core/lib/Drupal/Core/Entity/entity.api.php
@@ -1096,8 +1096,8 @@ function hook_ENTITY_TYPE_storage_load(array $entities) {
 /**
  * Act on an entity before it is created or updated.
  *
- * You can get the original entity object from $entity->original when it is an
- * update of the entity.
+ * You can get the original entity object from
+ * $entity->getOriginalDefaultRevision() when it is an update of the entity.
  *
  * @param \Drupal\Core\Entity\EntityInterface $entity
  *   The entity object.
@@ -1115,8 +1115,8 @@ function hook_entity_presave(\Drupal\Core\Entity\EntityInterface $entity) {
 /**
  * Act on a specific type of entity before it is created or updated.
  *
- * You can get the original entity object from $entity->original when it is an
- * update of the entity.
+ * You can get the original entity object from
+ * $entity->getOriginalDefaultRevision() when it is an update of the entity.
  *
  * @param \Drupal\Core\Entity\EntityInterface $entity
  *   The entity object.
diff --git a/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php
index 4aeeada309..2879ae9eab 100644
--- a/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php
@@ -51,10 +51,8 @@ class FinishResponseSubscriber implements EventSubscriberInterface {
 
   /**
    * The cache contexts manager service.
-   *
-   * @var \Drupal\Core\Cache\Context\CacheContextsManager
    */
-  protected $cacheContexts;
+  protected CacheContextsManager $cacheContextsManager;
 
   /**
    * Whether to send cacheability headers for debugging purposes.
diff --git a/core/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php
index 6add632887..0ee35bec18 100644
--- a/core/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php
@@ -25,6 +25,11 @@ class RedirectResponseSubscriber implements EventSubscriberInterface {
    */
   protected $unroutedUrlAssembler;
 
+  /**
+   * The request context.
+   */
+  protected RequestContext $requestContext;
+
   /**
    * Constructs a RedirectResponseSubscriber object.
    *
diff --git a/core/lib/Drupal/Core/Extension/Extension.php b/core/lib/Drupal/Core/Extension/Extension.php
index be92a25fc1..b775e992bd 100644
--- a/core/lib/Drupal/Core/Extension/Extension.php
+++ b/core/lib/Drupal/Core/Extension/Extension.php
@@ -10,6 +10,7 @@
  *
  * @see https://bugs.php.net/bug.php?id=66052
  */
+#[\AllowDynamicProperties]
 class Extension {
 
   /**
diff --git a/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php b/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php
index 54c08284f4..fd8b4ca3b1 100644
--- a/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php
+++ b/core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php
@@ -49,11 +49,6 @@ class BaseFieldOverride extends FieldConfigBase {
    */
   protected $baseFieldDefinition;
 
-  /**
-   * The original override.
-   */
-  public BaseFieldOverride $original;
-
   /**
    * Creates a base field override object.
    *
@@ -198,13 +193,13 @@ public function preSave(EntityStorageInterface $storage) {
     }
     else {
       // Some updates are always disallowed.
-      if ($this->entity_type != $this->original->entity_type) {
-        throw new FieldException("Cannot change the entity_type of an existing base field bundle override (entity type:{$this->entity_type}, bundle:{$this->original->bundle}, field name: {$this->field_name})");
+      if ($this->entity_type != $this->getOriginalDefaultRevision()->entity_type) {
+        throw new FieldException("Cannot change the entity_type of an existing base field bundle override (entity type:{$this->entity_type}, bundle:{$this->getOriginalDefaultRevision()->bundle}, field name: {$this->field_name})");
       }
-      if ($this->bundle != $this->original->bundle) {
-        throw new FieldException("Cannot change the bundle of an existing base field bundle override (entity type:{$this->entity_type}, bundle:{$this->original->bundle}, field name: {$this->field_name})");
+      if ($this->bundle != $this->getOriginalDefaultRevision()->bundle) {
+        throw new FieldException("Cannot change the bundle of an existing base field bundle override (entity type:{$this->entity_type}, bundle:{$this->getOriginalDefaultRevision()->bundle}, field name: {$this->field_name})");
       }
-      $previous_definition = $this->original;
+      $previous_definition = $this->getOriginalDefaultRevision();
     }
     // Notify the entity storage.
     $this->entityTypeManager()->getStorage($this->getTargetEntityTypeId())->onFieldDefinitionUpdate($this, $previous_definition);
diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/PasswordItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/PasswordItem.php
index e6afc01620..f4cd50255e 100644
--- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/PasswordItem.php
+++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/PasswordItem.php
@@ -49,9 +49,9 @@ public function preSave() {
     elseif (!$entity->isNew() && empty($this->value)) {
       // If the password is empty, that means it was not changed, so use the
       // original password.
-      $this->value = $entity->original->{$this->getFieldDefinition()->getName()}->value;
+      $this->value = $entity->getOriginalDefaultRevision()->{$this->getFieldDefinition()->getName()}->value;
     }
-    elseif ($entity->isNew() || (strlen(trim($this->value)) > 0 && $this->value != $entity->original->{$this->getFieldDefinition()->getName()}->value)) {
+    elseif ($entity->isNew() || (strlen(trim($this->value)) > 0 && $this->value != $entity->getOriginalDefaultRevision()->{$this->getFieldDefinition()->getName()}->value)) {
       // Allow alternate password hashing schemes.
       $this->value = \Drupal::service('password')->hash(trim($this->value));
       // Abort if the hashing failed and returned FALSE.
diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php
index 0a58801734..ffbfeb2f71 100644
--- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php
+++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php
@@ -30,6 +30,26 @@ abstract class OptionsWidgetBase extends WidgetBase {
    */
   protected $column;
 
+  /**
+   * Tracks whether the field is required.
+   */
+  protected bool $required;
+
+  /**
+   * Tracks whether the data is multi-valued.
+   */
+  protected bool $multiple;
+
+  /**
+   * Tracks whether the field has a value.
+   */
+  protected bool $has_value;
+
+  /**
+   * The array of options for the widget.
+   */
+  protected array $options;
+
   /**
    * {@inheritdoc}
    */
diff --git a/core/lib/Drupal/Core/Field/WidgetBase.php b/core/lib/Drupal/Core/Field/WidgetBase.php
index 4e9fd0ae2d..f8e0751bb7 100644
--- a/core/lib/Drupal/Core/Field/WidgetBase.php
+++ b/core/lib/Drupal/Core/Field/WidgetBase.php
@@ -440,7 +440,7 @@ public function flagErrors(FieldItemListInterface $items, ConstraintViolationLis
         $violations_by_delta = $item_list_violations = [];
         foreach ($violations as $violation) {
           // Separate violations by delta.
-          $property_path = explode('.', $violation->getPropertyPath());
+          $property_path = $this->getPropertyPathArray($violation);
           $delta = array_shift($property_path);
           if (is_numeric($delta)) {
             $violations_by_delta[$delta][] = $violation;
@@ -449,7 +449,6 @@ public function flagErrors(FieldItemListInterface $items, ConstraintViolationLis
           else {
             $item_list_violations[] = $violation;
           }
-          $violation->arrayPropertyPath = $property_path;
         }
 
         /** @var \Symfony\Component\Validator\ConstraintViolationInterface[] $delta_violations */
@@ -609,4 +608,17 @@ protected function getFilteredDescription() {
     return FieldFilteredMarkup::create(\Drupal::token()->replace((string) $this->fieldDefinition->getDescription()));
   }
 
+  /**
+   * Returns property path as array.
+   *
+   * @param \Symfony\Component\Validator\ConstraintViolationInterface $violation
+   *   The violation to get its property path.
+   *
+   * @return array
+   *   Array of path slugs.
+   */
+  protected function getPropertyPathArray(ConstraintViolationInterface $violation): array {
+    return explode('.', $violation->getPropertyPath());
+  }
+
 }
diff --git a/core/lib/Drupal/Core/FileTransfer/FileTransfer.php b/core/lib/Drupal/Core/FileTransfer/FileTransfer.php
index 4b68c237b9..46d3abb184 100644
--- a/core/lib/Drupal/Core/FileTransfer/FileTransfer.php
+++ b/core/lib/Drupal/Core/FileTransfer/FileTransfer.php
@@ -40,6 +40,9 @@ abstract class FileTransfer {
    * @var int
    */
   protected $port;
+  protected $jail;
+  protected $chroot;
+  // Test \Drupal\Tests\update\Functional\UpdateUploadTest.
 
   /**
    * Constructs a Drupal\Core\FileTransfer\FileTransfer object.
diff --git a/core/lib/Drupal/Core/Language/LanguageManager.php b/core/lib/Drupal/Core/Language/LanguageManager.php
index 915dac19f6..63cb059f94 100644
--- a/core/lib/Drupal/Core/Language/LanguageManager.php
+++ b/core/lib/Drupal/Core/Language/LanguageManager.php
@@ -32,6 +32,11 @@ class LanguageManager implements LanguageManagerInterface {
    */
   protected $defaultLanguage;
 
+  /**
+   * Information about all defined language types.
+   */
+  protected array $definedLanguageTypesInfo;
+
   /**
    * Constructs the language manager.
    *
diff --git a/core/lib/Drupal/Core/Mail/MailFormatHelper.php b/core/lib/Drupal/Core/Mail/MailFormatHelper.php
index 42468cbbf8..4d7a1ae7ae 100644
--- a/core/lib/Drupal/Core/Mail/MailFormatHelper.php
+++ b/core/lib/Drupal/Core/Mail/MailFormatHelper.php
@@ -125,7 +125,7 @@ public static function htmlToText($string, $allowed_tags = NULL) {
     // 'See the Drupal site [1]' with the URL included as a footnote.
     static::htmlToMailUrls(NULL, TRUE);
     $pattern = '@(<a[^>]+?href="([^"]*)"[^>]*?>(.+?)</a>)@i';
-    $string = preg_replace_callback($pattern, 'static::htmlToMailUrls', $string);
+    $string = preg_replace_callback($pattern, [static::class, 'htmlToMailUrls'], $string);
     $urls = static::htmlToMailUrls();
     $footnotes = '';
     if (count($urls)) {
diff --git a/core/lib/Drupal/Core/Render/Element.php b/core/lib/Drupal/Core/Render/Element.php
index dbd0804119..27e4d1ab05 100644
--- a/core/lib/Drupal/Core/Render/Element.php
+++ b/core/lib/Drupal/Core/Render/Element.php
@@ -37,7 +37,7 @@ public static function property($key) {
    *   An array of property keys for the element.
    */
   public static function properties(array $element) {
-    return array_filter(array_keys($element), 'static::property');
+    return array_filter(array_keys($element), [static::class, 'property']);
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Session/UserSession.php b/core/lib/Drupal/Core/Session/UserSession.php
index 5ed8e4c724..06cfda1f32 100644
--- a/core/lib/Drupal/Core/Session/UserSession.php
+++ b/core/lib/Drupal/Core/Session/UserSession.php
@@ -66,6 +66,23 @@ class UserSession implements AccountInterface {
    * @var string
    */
   protected $timezone;
+  protected $langcode;
+  protected $pass;
+  protected $status;
+  protected $created;
+  protected $changed;
+  protected $login;
+  protected $init;
+  protected $default_langcode;
+  protected $content_translation_source;
+  protected $content_translation_outdated;
+  protected $content_translation_uid;
+  protected $content_translation_status;
+  protected $content_translation_created;
+  protected $rest_test_validation;
+  public $pass_raw;
+  public $passRaw;
+  public $sessionId;
 
   /**
    * Constructs a new user session.
diff --git a/core/lib/Drupal/Core/Template/TwigNodeVisitor.php b/core/lib/Drupal/Core/Template/TwigNodeVisitor.php
index 0429b6a31d..e73afdce24 100644
--- a/core/lib/Drupal/Core/Template/TwigNodeVisitor.php
+++ b/core/lib/Drupal/Core/Template/TwigNodeVisitor.php
@@ -20,6 +20,11 @@
  */
 class TwigNodeVisitor extends AbstractNodeVisitor {
 
+  /**
+   * Tracks whether there is a render array aware filter active already.
+   */
+  protected ?bool $skipRenderVarFunction;
+
   /**
    * {@inheritdoc}
    */
diff --git a/core/lib/Drupal/Core/Test/PerformanceTestRecorder.php b/core/lib/Drupal/Core/Test/PerformanceTestRecorder.php
index e896df4737..2c7b62e986 100644
--- a/core/lib/Drupal/Core/Test/PerformanceTestRecorder.php
+++ b/core/lib/Drupal/Core/Test/PerformanceTestRecorder.php
@@ -16,10 +16,8 @@ class PerformanceTestRecorder implements EventSubscriberInterface {
 
   /**
    * The state service for persistent storage if necessary.
-   *
-   * @var \Drupal\Core\State\StateInterface
    */
-  protected $service;
+  protected ?StateInterface $state;
 
   /**
    * @var array
diff --git a/core/lib/Drupal/Core/Test/TestKernel.php b/core/lib/Drupal/Core/Test/TestKernel.php
index 124dff402b..cf7ff4e723 100644
--- a/core/lib/Drupal/Core/Test/TestKernel.php
+++ b/core/lib/Drupal/Core/Test/TestKernel.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\Core\Test;
 
+use Drupal\Core\DependencyInjection\ContainerBuilder;
 use Drupal\Core\DrupalKernel;
 
 /**
@@ -22,4 +23,23 @@ public function __construct($environment, $class_loader, $allow_dumping = TRUE)
     parent::__construct($environment, $class_loader, $allow_dumping);
   }
 
+  /**
+   * Sets a container with a kernel service on the Drupal class.
+   *
+   * @return \Drupal\Component\DependencyInjection\ContainerInterface
+   *   A container with the kernel service set.
+   */
+  public static function setContainerWithKernel() {
+    $container = new ContainerBuilder();
+    $kernel = new DrupalKernel('test', NULL);
+    // Objects of the same type will have access to each others private and
+    // protected members even though they are not the same instances. This is
+    // because the implementation specific details are already known when
+    // inside those objects.
+    $kernel->container = $container;
+    $container->set('kernel', $kernel);
+    \Drupal::setContainer($container);
+    return $container;
+  }
+
 }
diff --git a/core/lib/Drupal/Core/Test/TestSetupTrait.php b/core/lib/Drupal/Core/Test/TestSetupTrait.php
index f7ba3e0279..52d640094f 100644
--- a/core/lib/Drupal/Core/Test/TestSetupTrait.php
+++ b/core/lib/Drupal/Core/Test/TestSetupTrait.php
@@ -80,6 +80,20 @@ trait TestSetupTrait {
    */
   protected $kernel;
 
+  /**
+   * The database prefix of this test run.
+   *
+   * @var string
+   */
+  protected $databasePrefix;
+
+  /**
+   * The app root.
+   *
+   * @var string
+   */
+  protected $root;
+
   /**
    * The temporary file directory for the test environment.
    *
diff --git a/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php b/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php
index f0b885a10c..29efd63f7e 100644
--- a/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php
+++ b/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php
@@ -52,6 +52,11 @@ class RecursiveContextualValidator implements ContextualValidatorInterface {
    */
   protected $constraintValidatorFactory;
 
+  /**
+   * The typed data manager.
+   */
+  protected TypedDataManagerInterface $typedDataManager;
+
   /**
    * Creates a validator for the given context.
    *
diff --git a/core/lib/Drupal/Core/Updater/Updater.php b/core/lib/Drupal/Core/Updater/Updater.php
index 65c7409bbc..402047fc98 100644
--- a/core/lib/Drupal/Core/Updater/Updater.php
+++ b/core/lib/Drupal/Core/Updater/Updater.php
@@ -24,6 +24,16 @@ class Updater {
    */
   protected $root;
 
+  /**
+   * The name of the project directory (basename).
+   */
+  protected string $name;
+
+  /**
+   * The title of the project.
+   */
+  protected string $title;
+
   /**
    * Constructs a new updater.
    *
diff --git a/core/lib/Drupal/Core/Validation/ConstraintValidatorFactory.php b/core/lib/Drupal/Core/Validation/ConstraintValidatorFactory.php
index 218033e580..8960dd573d 100644
--- a/core/lib/Drupal/Core/Validation/ConstraintValidatorFactory.php
+++ b/core/lib/Drupal/Core/Validation/ConstraintValidatorFactory.php
@@ -15,6 +15,11 @@
  */
 class ConstraintValidatorFactory extends BaseConstraintValidatorFactory {
 
+  /**
+   * The class resolver.
+   */
+  protected ClassResolverInterface $classResolver;
+
   /**
    * Constructs a new ConstraintValidatorFactory.
    *
diff --git a/core/modules/block/src/Entity/Block.php b/core/modules/block/src/Entity/Block.php
index ece8de38ab..04df594e8d 100644
--- a/core/modules/block/src/Entity/Block.php
+++ b/core/modules/block/src/Entity/Block.php
@@ -137,6 +137,7 @@ class Block extends ConfigEntityBase implements BlockInterface, EntityWithPlugin
    * @var string
    */
   protected $theme;
+  protected $provider;
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block/src/Plugin/migrate/process/BlockTheme.php b/core/modules/block/src/Plugin/migrate/process/BlockTheme.php
index 408f83be67..a1e935698e 100644
--- a/core/modules/block/src/Plugin/migrate/process/BlockTheme.php
+++ b/core/modules/block/src/Plugin/migrate/process/BlockTheme.php
@@ -31,6 +31,11 @@ class BlockTheme extends ProcessPluginBase implements ContainerFactoryPluginInte
    */
   protected $themeConfig;
 
+  /**
+   * List of themes available on the destination.
+   */
+  protected array $themes;
+
   /**
    * Constructs a BlockTheme object.
    *
diff --git a/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestAccessBlock.php b/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestAccessBlock.php
index e558bcb90e..4bb9f24cc0 100644
--- a/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestAccessBlock.php
+++ b/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestAccessBlock.php
@@ -20,6 +20,11 @@
  */
 class TestAccessBlock extends BlockBase implements ContainerFactoryPluginInterface {
 
+  /**
+   * The state service.
+   */
+  protected StateInterface $state;
+
   /**
    * Tests the test access block.
    *
diff --git a/core/modules/block_content/src/Entity/BlockContent.php b/core/modules/block_content/src/Entity/BlockContent.php
index 95ba40da6d..249f63c1e2 100644
--- a/core/modules/block_content/src/Entity/BlockContent.php
+++ b/core/modules/block_content/src/Entity/BlockContent.php
@@ -121,7 +121,7 @@ public function getTheme() {
    */
   public function postSave(EntityStorageInterface $storage, $update = TRUE) {
     parent::postSave($storage, $update);
-    if ($this->isReusable() || (isset($this->original) && $this->original->isReusable())) {
+    if ($this->isReusable() || ($this->getOriginalDefaultRevision() && $this->getOriginalDefaultRevision()->isReusable())) {
       static::invalidateBlockPluginCache();
     }
   }
@@ -154,11 +154,11 @@ public function getInstances() {
   public function preSaveRevision(EntityStorageInterface $storage, \stdClass $record) {
     parent::preSaveRevision($storage, $record);
 
-    if (!$this->isNewRevision() && isset($this->original) && (!isset($record->revision_log) || $record->revision_log === '')) {
+    if (!$this->isNewRevision() && $this->getOriginalDefaultRevision() && (!isset($record->revision_log) || $record->revision_log === '')) {
       // If we are updating an existing block_content without adding a new
       // revision and the user did not supply a revision log, keep the existing
       // one.
-      $record->revision_log = $this->original->getRevisionLogMessage();
+      $record->revision_log = $this->getOriginalDefaultRevision()->getRevisionLogMessage();
     }
   }
 
diff --git a/core/modules/block_content/tests/modules/block_content_test/block_content_test.module b/core/modules/block_content/tests/modules/block_content_test/block_content_test.module
index 0489a617b6..fb030502e1 100644
--- a/core/modules/block_content/tests/modules/block_content_test/block_content_test.module
+++ b/core/modules/block_content/tests/modules/block_content_test/block_content_test.module
@@ -28,8 +28,8 @@ function block_content_test_block_content_presave(BlockContent $block_content) {
     $block_content->setInfo($block_content->label() . '_presave');
   }
   // Determine changes.
-  if (!empty($block_content->original) && $block_content->original->label() == 'test_changes') {
-    if ($block_content->original->label() != $block_content->label()) {
+  if ($block_content->getOriginalDefaultRevision() && $block_content->getOriginalDefaultRevision()->label() == 'test_changes') {
+    if ($block_content->getOriginalDefaultRevision()->label() != $block_content->label()) {
       $block_content->setInfo($block_content->label() . '_presave');
       // Drupal 1.0 release.
       $block_content->changed = 979534800;
@@ -42,8 +42,8 @@ function block_content_test_block_content_presave(BlockContent $block_content) {
  */
 function block_content_test_block_content_update(BlockContent $block_content) {
   // Determine changes on update.
-  if (!empty($block_content->original) && $block_content->original->label() == 'test_changes') {
-    if ($block_content->original->label() != $block_content->label()) {
+  if ($block_content->getOriginalDefaultRevision() && $block_content->getOriginalDefaultRevision()->label() == 'test_changes') {
+    if ($block_content->getOriginalDefaultRevision()->label() != $block_content->label()) {
       $block_content->setInfo($block_content->label() . '_update');
     }
   }
diff --git a/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php b/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php
index f5e1835af5..58c3e16a68 100644
--- a/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php
+++ b/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php
@@ -15,6 +15,16 @@
  */
 class StatisticsLastCommentName extends FieldPluginBase {
 
+  /**
+   * The users table.
+   */
+  protected ?string $user_table;
+
+  /**
+   * The user name field.
+   */
+  protected string $user_field;
+
   /**
    * The user id.
    */
diff --git a/core/modules/comment/src/Plugin/views/field/StatisticsLastUpdated.php b/core/modules/comment/src/Plugin/views/field/StatisticsLastUpdated.php
index a3788e0b53..1409ff2b9f 100644
--- a/core/modules/comment/src/Plugin/views/field/StatisticsLastUpdated.php
+++ b/core/modules/comment/src/Plugin/views/field/StatisticsLastUpdated.php
@@ -13,6 +13,11 @@
  */
 class StatisticsLastUpdated extends Date {
 
+  /**
+   * The nodes table.
+   */
+  protected ?string $node_table;
+
   public function query() {
     $this->ensureMyTable();
     $this->node_table = $this->query->ensureTable('node_field_data', $this->relationship);
diff --git a/core/modules/comment/src/Plugin/views/filter/StatisticsLastUpdated.php b/core/modules/comment/src/Plugin/views/filter/StatisticsLastUpdated.php
index 046edf4c3f..68e3f3164a 100644
--- a/core/modules/comment/src/Plugin/views/filter/StatisticsLastUpdated.php
+++ b/core/modules/comment/src/Plugin/views/filter/StatisticsLastUpdated.php
@@ -13,6 +13,11 @@
  */
 class StatisticsLastUpdated extends Date {
 
+  /**
+   * The nodes table.
+   */
+  protected ?string $node_table;
+
   public function query() {
     $this->ensureMyTable();
     $this->node_table = $this->query->ensureTable('node', $this->relationship);
diff --git a/core/modules/comment/src/Plugin/views/sort/StatisticsLastCommentName.php b/core/modules/comment/src/Plugin/views/sort/StatisticsLastCommentName.php
index 48f556e68a..1ac684ac55 100644
--- a/core/modules/comment/src/Plugin/views/sort/StatisticsLastCommentName.php
+++ b/core/modules/comment/src/Plugin/views/sort/StatisticsLastCommentName.php
@@ -14,6 +14,16 @@
  */
 class StatisticsLastCommentName extends SortPluginBase {
 
+  /**
+   * The users' table.
+   */
+  protected ?string $user_table;
+
+  /**
+   * The user name field.
+   */
+  protected string $user_field;
+
   public function query() {
     $this->ensureMyTable();
     $definition = [
diff --git a/core/modules/comment/src/Plugin/views/sort/StatisticsLastUpdated.php b/core/modules/comment/src/Plugin/views/sort/StatisticsLastUpdated.php
index 0f9c055ec9..606342758a 100644
--- a/core/modules/comment/src/Plugin/views/sort/StatisticsLastUpdated.php
+++ b/core/modules/comment/src/Plugin/views/sort/StatisticsLastUpdated.php
@@ -13,6 +13,16 @@
  */
 class StatisticsLastUpdated extends Date {
 
+  /**
+   * The nodes' table.
+   */
+  protected ?string $node_table;
+
+  /**
+   * The field alias.
+   */
+  protected string $field_alias;
+
   public function query() {
     $this->ensureMyTable();
     $this->node_table = $this->query->ensureTable('node', $this->relationship);
diff --git a/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php b/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php
index 606ffee101..99d82ac36e 100644
--- a/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php
@@ -170,7 +170,7 @@ public function testInvalidStateWithoutExisting() {
     $node->moderation_state->value = 'deleted_state';
     $node->save();
 
-    // Delete the state so $node->original contains an invalid state when
+    // Delete the state so the original entity contains an invalid state when
     // validating.
     $workflow->getTypePlugin()->deleteState('deleted_state');
     $workflow->save();
diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module
index 9910ba31bd..5b3b180761 100644
--- a/core/modules/content_translation/content_translation.module
+++ b/core/modules/content_translation/content_translation.module
@@ -520,14 +520,14 @@ function content_translation_form_field_config_edit_form_alter(array &$form, For
  * Implements hook_entity_presave().
  */
 function content_translation_entity_presave(EntityInterface $entity) {
-  if ($entity instanceof ContentEntityInterface && $entity->isTranslatable() && !$entity->isNew() && isset($entity->original)) {
+  if ($entity instanceof ContentEntityInterface && $entity->isTranslatable() && !$entity->isNew() && $entity->getOriginalDefaultRevision()) {
     /** @var \Drupal\content_translation\ContentTranslationManagerInterface $manager */
     $manager = \Drupal::service('content_translation.manager');
     if (!$manager->isEnabled($entity->getEntityTypeId(), $entity->bundle())) {
       return;
     }
     $langcode = $entity->language()->getId();
-    $source_langcode = !$entity->original->hasTranslation($langcode) ? $manager->getTranslationMetadata($entity)->getSource() : NULL;
+    $source_langcode = !$entity->getOriginalDefaultRevision()->hasTranslation($langcode) ? $manager->getTranslationMetadata($entity)->getSource() : NULL;
     \Drupal::service('content_translation.synchronizer')->synchronizeFields($entity, $langcode, $source_langcode);
   }
 }
diff --git a/core/modules/content_translation/src/FieldTranslationSynchronizer.php b/core/modules/content_translation/src/FieldTranslationSynchronizer.php
index 336909d2a7..e44a8cbf45 100644
--- a/core/modules/content_translation/src/FieldTranslationSynchronizer.php
+++ b/core/modules/content_translation/src/FieldTranslationSynchronizer.php
@@ -189,12 +189,12 @@ public function synchronizeFields(ContentEntityInterface $entity, $sync_langcode
    *   The unchanged entity.
    */
   protected function getOriginalEntity(ContentEntityInterface $entity) {
-    if (!isset($entity->original)) {
+    if (!$entity->getOriginalDefaultRevision()) {
       $storage = $this->entityTypeManager->getStorage($entity->getEntityTypeId());
       $original = $entity->isDefaultRevision() ? $storage->loadUnchanged($entity->id()) : $storage->loadRevision($entity->getLoadedRevisionId());
     }
     else {
-      $original = $entity->original;
+      $original = $entity->getOriginalDefaultRevision();
     }
     return $original;
   }
diff --git a/core/modules/content_translation/src/Plugin/Validation/Constraint/ContentTranslationSynchronizedFieldsConstraintValidator.php b/core/modules/content_translation/src/Plugin/Validation/Constraint/ContentTranslationSynchronizedFieldsConstraintValidator.php
index 127b6452b2..bc48a611a7 100644
--- a/core/modules/content_translation/src/Plugin/Validation/Constraint/ContentTranslationSynchronizedFieldsConstraintValidator.php
+++ b/core/modules/content_translation/src/Plugin/Validation/Constraint/ContentTranslationSynchronizedFieldsConstraintValidator.php
@@ -169,12 +169,12 @@ protected function hasSynchronizedPropertyChanges(ContentEntityInterface $entity
    *   The unchanged entity.
    */
   protected function getOriginalEntity(ContentEntityInterface $entity) {
-    if (!isset($entity->original)) {
+    if (!$entity->getOriginalDefaultRevision()) {
       $storage = $this->entityTypeManager->getStorage($entity->getEntityTypeId());
       $original = $entity->isDefaultRevision() ? $storage->loadUnchanged($entity->id()) : $storage->loadRevision($entity->getLoadedRevisionId());
     }
     else {
-      $original = $entity->original;
+      $original = $entity->getOriginalDefaultRevision();
     }
     return $original;
   }
diff --git a/core/modules/editor/editor.module b/core/modules/editor/editor.module
index fcada7ffb8..9cf2d87874 100644
--- a/core/modules/editor/editor.module
+++ b/core/modules/editor/editor.module
@@ -374,7 +374,7 @@ function editor_entity_update(EntityInterface $entity) {
 
   // On new revisions, all files are considered to be a new usage and no
   // deletion of previous file usages are necessary.
-  if (!empty($entity->original) && $entity->getRevisionId() != $entity->original->getRevisionId()) {
+  if ($entity->getOriginalDefaultRevision() && $entity->getRevisionId() != $entity->getOriginalDefaultRevision()->getRevisionId()) {
     $referenced_files_by_field = _editor_get_file_uuids_by_field($entity);
     foreach ($referenced_files_by_field as $uuids) {
       _editor_record_file_usage($uuids, $entity);
@@ -385,8 +385,8 @@ function editor_entity_update(EntityInterface $entity) {
   // File references that existed both in the previous version of the revision
   // and in the new one don't need their usage to be updated.
   else {
-    $original_uuids_by_field = empty($entity->original) ? [] :
-      _editor_get_file_uuids_by_field($entity->original);
+    $original_uuids_by_field = !$entity->getOriginalDefaultRevision() ? [] :
+      _editor_get_file_uuids_by_field($entity->getOriginalDefaultRevision());
 
     $uuids_by_field = _editor_get_file_uuids_by_field($entity);
 
diff --git a/core/modules/field/field.module b/core/modules/field/field.module
index ad9b8f538b..f68d8832f2 100644
--- a/core/modules/field/field.module
+++ b/core/modules/field/field.module
@@ -374,7 +374,7 @@ function field_field_storage_config_update(FieldStorageConfigInterface $field_st
   }
 
   // If target_type changed, reset the handler in the fields using that storage.
-  if ($field_storage->getSetting('target_type') !== $field_storage->original->getSetting('target_type')) {
+  if ($field_storage->getSetting('target_type') !== $field_storage->getOriginalDefaultRevision()->getSetting('target_type')) {
     foreach ($field_storage->getBundles() as $bundle) {
       $field = FieldConfig::loadByName($field_storage->getTargetEntityTypeId(), $bundle, $field_storage->getName());
       // Reset the handler settings. This triggers field_field_config_presave(),
diff --git a/core/modules/field/src/Entity/FieldConfig.php b/core/modules/field/src/Entity/FieldConfig.php
index 8067f5be5d..15bfb16e04 100644
--- a/core/modules/field/src/Entity/FieldConfig.php
+++ b/core/modules/field/src/Entity/FieldConfig.php
@@ -71,11 +71,6 @@ class FieldConfig extends FieldConfigBase implements FieldConfigInterface {
    */
   protected $fieldStorage;
 
-  /**
-   * The original FieldConfig entity.
-   */
-  public FieldConfig $original;
-
   /**
    * Constructs a FieldConfig object.
    *
@@ -171,17 +166,17 @@ public function preSave(EntityStorageInterface $storage) {
     }
     else {
       // Some updates are always disallowed.
-      if ($this->entity_type != $this->original->entity_type) {
+      if ($this->entity_type != $this->getOriginalDefaultRevision()->entity_type) {
         throw new FieldException("Cannot change an existing field's entity_type.");
       }
-      if ($this->bundle != $this->original->bundle) {
+      if ($this->bundle != $this->getOriginalDefaultRevision()->bundle) {
         throw new FieldException("Cannot change an existing field's bundle.");
       }
-      if ($storage_definition->uuid() != $this->original->getFieldStorageDefinition()->uuid()) {
+      if ($storage_definition->uuid() != $this->getOriginalDefaultRevision()->getFieldStorageDefinition()->uuid()) {
         throw new FieldException("Cannot change an existing field's storage.");
       }
       // Notify the entity storage.
-      \Drupal::service('field_definition.listener')->onFieldDefinitionUpdate($this, $this->original);
+      \Drupal::service('field_definition.listener')->onFieldDefinitionUpdate($this, $this->getOriginalDefaultRevision());
     }
 
     parent::preSave($storage);
diff --git a/core/modules/field/src/Entity/FieldStorageConfig.php b/core/modules/field/src/Entity/FieldStorageConfig.php
index 0aa8dca378..2b65a727ad 100644
--- a/core/modules/field/src/Entity/FieldStorageConfig.php
+++ b/core/modules/field/src/Entity/FieldStorageConfig.php
@@ -229,11 +229,6 @@ class FieldStorageConfig extends ConfigEntityBase implements FieldStorageConfigI
    */
   protected static $inDeletion = FALSE;
 
-  /**
-   * Copy of the field before changes.
-   */
-  public FieldStorageConfigInterface $original;
-
   /**
    * Constructs a FieldStorageConfig object.
    *
@@ -376,21 +371,21 @@ protected function preSaveUpdated(EntityStorageInterface $storage) {
     $module_handler = \Drupal::moduleHandler();
 
     // Some updates are always disallowed.
-    if ($this->getType() != $this->original->getType()) {
-      throw new FieldException(sprintf('Cannot change the field type for an existing field storage. The field storage %s has the type %s.', $this->id(), $this->original->getType()));
+    if ($this->getType() != $this->getOriginalDefaultRevision()->getType()) {
+      throw new FieldException(sprintf('Cannot change the field type for an existing field storage. The field storage %s has the type %s.', $this->id(), $this->getOriginalDefaultRevision()->getType()));
     }
-    if ($this->getTargetEntityTypeId() != $this->original->getTargetEntityTypeId()) {
-      throw new FieldException(sprintf('Cannot change the entity type for an existing field storage. The field storage %s has the type %s.', $this->id(), $this->original->getTargetEntityTypeId()));
+    if ($this->getTargetEntityTypeId() != $this->getOriginalDefaultRevision()->getTargetEntityTypeId()) {
+      throw new FieldException(sprintf('Cannot change the entity type for an existing field storage. The field storage %s has the type %s.', $this->id(), $this->getOriginalDefaultRevision()->getTargetEntityTypeId()));
     }
 
     // See if any module forbids the update by throwing an exception. This
     // invokes hook_field_storage_config_update_forbid().
-    $module_handler->invokeAll('field_storage_config_update_forbid', [$this, $this->original]);
+    $module_handler->invokeAll('field_storage_config_update_forbid', [$this, $this->getOriginalDefaultRevision()]);
 
     // Notify the field storage definition listener. A listener can reject the
     // definition update as invalid by raising an exception, which stops
     // execution before the definition is written to config.
-    \Drupal::service('field_storage_definition.listener')->onFieldStorageDefinitionUpdate($this, $this->original);
+    \Drupal::service('field_storage_definition.listener')->onFieldStorageDefinitionUpdate($this, $this->getOriginalDefaultRevision());
   }
 
   /**
diff --git a/core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldFormatter/TestFieldDefaultFormatter.php b/core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldFormatter/TestFieldDefaultFormatter.php
index 80f860bfaf..7803cce32b 100644
--- a/core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldFormatter/TestFieldDefaultFormatter.php
+++ b/core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldFormatter/TestFieldDefaultFormatter.php
@@ -22,6 +22,15 @@
  */
 class TestFieldDefaultFormatter extends FormatterBase {
 
+  /**
+   * Custom property to serialize in test.
+   *
+   * @see \Drupal\Tests\field_ui\Kernel\EntityDisplayTest::testFieldComponent()
+   *
+   * @var string
+   */
+  public $randomValue;
+
   /**
    * {@inheritdoc}
    */
diff --git a/core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldWidget/TestFieldWidget.php b/core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldWidget/TestFieldWidget.php
index b2f9738f24..e05748d4d9 100644
--- a/core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldWidget/TestFieldWidget.php
+++ b/core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldWidget/TestFieldWidget.php
@@ -23,6 +23,11 @@
  */
 class TestFieldWidget extends WidgetBase {
 
+  /**
+   * \Drupal\Tests\field_ui\Kernel\EntityFormDisplayTest.
+   */
+  public $randomValue;
+
   /**
    * {@inheritdoc}
    */
diff --git a/core/modules/field_ui/src/Plugin/Derivative/FieldUiLocalAction.php b/core/modules/field_ui/src/Plugin/Derivative/FieldUiLocalAction.php
index 533a911acf..c572216c85 100644
--- a/core/modules/field_ui/src/Plugin/Derivative/FieldUiLocalAction.php
+++ b/core/modules/field_ui/src/Plugin/Derivative/FieldUiLocalAction.php
@@ -16,6 +16,11 @@ class FieldUiLocalAction extends DeriverBase implements ContainerDeriverInterfac
 
   use StringTranslationTrait;
 
+  /**
+   * The route provider to load routes by name.
+   */
+  protected RouteProviderInterface $routeProvider;
+
   /**
    * The entity type manager.
    *
diff --git a/core/modules/file/src/Plugin/Field/FieldType/FileFieldItemList.php b/core/modules/file/src/Plugin/Field/FieldType/FileFieldItemList.php
index ab936177bb..ccce74a974 100644
--- a/core/modules/file/src/Plugin/Field/FieldType/FileFieldItemList.php
+++ b/core/modules/file/src/Plugin/Field/FieldType/FileFieldItemList.php
@@ -39,7 +39,7 @@ public function postSave($update) {
 
       // On new revisions, all files are considered to be a new usage and no
       // deletion of previous file usages are necessary.
-      if (!empty($entity->original) && $entity->getRevisionId() != $entity->original->getRevisionId()) {
+      if ($entity->getOriginalDefaultRevision() && $entity->getRevisionId() != $entity->getOriginalDefaultRevision()->getRevisionId()) {
         foreach ($files as $file) {
           \Drupal::service('file.usage')->add($file, 'file', $entity->getEntityTypeId(), $entity->id());
         }
diff --git a/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php b/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php
index bf6ceb0612..354fed1cf7 100644
--- a/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php
+++ b/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php
@@ -28,6 +28,11 @@
  */
 class FileWidget extends WidgetBase {
 
+  /**
+   * The element info manager.
+   */
+  protected ElementInfoManagerInterface $elementInfo;
+
   /**
    * {@inheritdoc}
    */
diff --git a/core/modules/file/src/Plugin/migrate/process/d6/FieldFile.php b/core/modules/file/src/Plugin/migrate/process/d6/FieldFile.php
index 86987453de..eb378a0969 100644
--- a/core/modules/file/src/Plugin/migrate/process/d6/FieldFile.php
+++ b/core/modules/file/src/Plugin/migrate/process/d6/FieldFile.php
@@ -17,6 +17,11 @@
  */
 class FieldFile extends ProcessPluginBase implements ContainerFactoryPluginInterface {
 
+  /**
+   * The current migration.
+   */
+  protected MigrationInterface $migration;
+
   /**
    * The migrate lookup service.
    *
diff --git a/core/modules/filter/src/Plugin/migrate/process/d6/FilterFormatPermission.php b/core/modules/filter/src/Plugin/migrate/process/d6/FilterFormatPermission.php
index 2e688aa71f..357d356203 100644
--- a/core/modules/filter/src/Plugin/migrate/process/d6/FilterFormatPermission.php
+++ b/core/modules/filter/src/Plugin/migrate/process/d6/FilterFormatPermission.php
@@ -20,6 +20,11 @@
  */
 class FilterFormatPermission extends ProcessPluginBase implements ContainerFactoryPluginInterface {
 
+  /**
+   * The current migration.
+   */
+  protected MigrationInterface $migration;
+
   /**
    * The migrate lookup service.
    *
diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module
index c11ec858f8..2d5e579e42 100644
--- a/core/modules/forum/forum.module
+++ b/core/modules/forum/forum.module
@@ -175,7 +175,7 @@ function forum_node_update(EntityInterface $node) {
     // otherwise insert a new one.
     /** @var \Drupal\forum\ForumIndexStorageInterface $forum_index_storage */
     $forum_index_storage = \Drupal::service('forum.index_storage');
-    if ($node->getRevisionId() == $node->original->getRevisionId() && $forum_index_storage->getOriginalTermId($node)) {
+    if ($node->getRevisionId() == $node->getOriginalDefaultRevision()->getRevisionId() && $forum_index_storage->getOriginalTermId($node)) {
       if (!empty($node->forum_tid)) {
         $forum_index_storage->update($node);
       }
diff --git a/core/modules/help_topics/src/Plugin/HelpSection/HelpTopicSection.php b/core/modules/help_topics/src/Plugin/HelpSection/HelpTopicSection.php
index 566aa1e3c9..b69782b7ed 100644
--- a/core/modules/help_topics/src/Plugin/HelpSection/HelpTopicSection.php
+++ b/core/modules/help_topics/src/Plugin/HelpSection/HelpTopicSection.php
@@ -78,10 +78,8 @@ class HelpTopicSection extends HelpSectionPluginBase implements ContainerFactory
 
   /**
    * The string translation service.
-   *
-   * @var \Drupal\Core\StringTranslation\TranslationManager
    */
-  protected $stringTranslation;
+  protected TranslationManager $translationManager;
 
   /**
    * Constructs a HelpTopicSection object.
diff --git a/core/modules/image/image.module b/core/modules/image/image.module
index 5d4aa2754e..bdb0756154 100644
--- a/core/modules/image/image.module
+++ b/core/modules/image/image.module
@@ -352,7 +352,7 @@ function image_entity_presave(EntityInterface $entity) {
 
   $uuid = $default_image['uuid'];
   if ($uuid) {
-    $original_uuid = isset($entity->original) ? $entity->original->getSetting('default_image')['uuid'] : NULL;
+    $original_uuid = $entity->getOriginalDefaultRevision() ? $entity->getOriginalDefaultRevision()->getSetting('default_image')['uuid'] : NULL;
     if ($uuid != $original_uuid) {
       $file = \Drupal::service('entity.repository')->loadEntityByUuid('file', $uuid);
       if ($file) {
diff --git a/core/modules/image/src/Entity/ImageStyle.php b/core/modules/image/src/Entity/ImageStyle.php
index f7edba286b..68e624af07 100644
--- a/core/modules/image/src/Entity/ImageStyle.php
+++ b/core/modules/image/src/Entity/ImageStyle.php
@@ -108,9 +108,9 @@ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
     parent::postSave($storage, $update);
 
     if ($update) {
-      if (!empty($this->original) && $this->id() !== $this->original->id()) {
+      if ($this->getOriginalDefaultRevision() && $this->id() !== $this->getOriginalDefaultRevision()->id()) {
         // The old image style name needs flushing after a rename.
-        $this->original->flush();
+        $this->getOriginalDefaultRevision()->flush();
         // Update field settings if necessary.
         if (!$this->isSyncing()) {
           static::replaceImageStyle($this);
diff --git a/core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php b/core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php
index 77a2dcbab9..ec379ab881 100644
--- a/core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php
+++ b/core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php
@@ -65,10 +65,6 @@ protected function setUpAuthorization($method) {
   protected function setUp(): void {
     parent::setUp();
 
-    // Set up a HTTP client that accepts relative URLs.
-    $this->httpClient = $this->container->get('http_client_factory')
-      ->fromOptions(['base_uri' => $this->baseUrl]);
-
     // Create a "Camelids" node type.
     NodeType::create([
       'name' => 'Camelids',
diff --git a/core/modules/language/src/LanguageNegotiationMethodManager.php b/core/modules/language/src/LanguageNegotiationMethodManager.php
index 53b59ed724..3839c01b8a 100644
--- a/core/modules/language/src/LanguageNegotiationMethodManager.php
+++ b/core/modules/language/src/LanguageNegotiationMethodManager.php
@@ -11,6 +11,11 @@
  */
 class LanguageNegotiationMethodManager extends DefaultPluginManager {
 
+  /**
+   * The cache key prefix.
+   */
+  protected string $cacheKeyPrefix;
+
   /**
    * Constructs a new LanguageNegotiationMethodManager object.
    *
diff --git a/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php b/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
index c63b96ff01..4e982ab955 100644
--- a/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
+++ b/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
@@ -124,7 +124,7 @@ protected function setSections(array $sections) {
   public function preSave(EntityStorageInterface $storage) {
     parent::preSave($storage);
 
-    $original_value = isset($this->original) ? $this->original->isOverridable() : FALSE;
+    $original_value = $this->getOriginalDefaultRevision() ? $this->getOriginalDefaultRevision()->isOverridable() : FALSE;
     $new_value = $this->isOverridable();
     if ($original_value !== $new_value) {
       $entity_type_id = $this->getTargetEntityTypeId();
@@ -138,7 +138,7 @@ public function preSave(EntityStorageInterface $storage) {
       }
     }
 
-    $already_enabled = isset($this->original) ? $this->original->isLayoutBuilderEnabled() : FALSE;
+    $already_enabled = $this->getOriginalDefaultRevision() ? $this->getOriginalDefaultRevision()->isLayoutBuilderEnabled() : FALSE;
     $set_enabled = $this->isLayoutBuilderEnabled();
     if ($already_enabled !== $set_enabled) {
       if ($set_enabled) {
diff --git a/core/modules/layout_builder/src/InlineBlockEntityOperations.php b/core/modules/layout_builder/src/InlineBlockEntityOperations.php
index 5b11bbe674..79c44f6d66 100644
--- a/core/modules/layout_builder/src/InlineBlockEntityOperations.php
+++ b/core/modules/layout_builder/src/InlineBlockEntityOperations.php
@@ -79,12 +79,12 @@ public static function create(ContainerInterface $container) {
    *   The parent entity.
    */
   protected function removeUnusedForEntityOnSave(EntityInterface $entity) {
-    // If the entity is new or '$entity->original' is not set then there will
+    // If the entity is new or there is no original entity then there will
     // not be any unused inline blocks to remove.
     // If this is a revisionable entity then do not remove inline blocks. They
     // could be referenced in previous revisions even if this is not a new
     // revision.
-    if ($entity->isNew() || !isset($entity->original) || $entity instanceof RevisionableInterface) {
+    if ($entity->isNew() || !$entity->getOriginalDefaultRevision() || $entity instanceof RevisionableInterface) {
       return;
     }
     // If the original entity used the default storage then we cannot remove
@@ -110,7 +110,7 @@ protected function removeUnusedForEntityOnSave(EntityInterface $entity) {
    *   The block content IDs that were removed.
    */
   protected function getRemovedBlockIds(EntityInterface $entity) {
-    $original_sections = $this->getEntitySections($entity->original);
+    $original_sections = $this->getEntitySections($entity->getOriginalDefaultRevision());
     $current_sections = $this->getEntitySections($entity);
     // Avoid un-needed conversion from revision IDs to block content IDs by
     // first determining if there are any revisions in the original that are not
diff --git a/core/modules/layout_builder/src/LayoutEntityHelperTrait.php b/core/modules/layout_builder/src/LayoutEntityHelperTrait.php
index 1abf322178..4103b49c32 100644
--- a/core/modules/layout_builder/src/LayoutEntityHelperTrait.php
+++ b/core/modules/layout_builder/src/LayoutEntityHelperTrait.php
@@ -127,7 +127,7 @@ protected function getSectionStorageForEntity(EntityInterface $entity) {
    * Determines if the original entity used the default section storage.
    *
    * This method can be used during the entity save process to determine whether
-   * $entity->original is set and used the default section storage plugin as
+   * the original entity is set and used the default section storage plugin as
    * determined by ::getSectionStorageForEntity().
    *
    * @param \Drupal\Core\Entity\EntityInterface $entity
@@ -138,8 +138,8 @@ protected function getSectionStorageForEntity(EntityInterface $entity) {
    */
   protected function originalEntityUsesDefaultStorage(EntityInterface $entity) {
     $section_storage = $this->getSectionStorageForEntity($entity);
-    if ($section_storage instanceof OverridesSectionStorageInterface && !$entity->isNew() && isset($entity->original)) {
-      $original_section_storage = $this->getSectionStorageForEntity($entity->original);
+    if ($section_storage instanceof OverridesSectionStorageInterface && !$entity->isNew() && $entity->getOriginalDefaultRevision()) {
+      $original_section_storage = $this->getSectionStorageForEntity($entity->getOriginalDefaultRevision());
       return $original_section_storage instanceof DefaultsSectionStorageInterface;
     }
     return FALSE;
diff --git a/core/modules/layout_builder/tests/src/Kernel/LayoutEntityHelperTraitTest.php b/core/modules/layout_builder/tests/src/Kernel/LayoutEntityHelperTraitTest.php
index df528c0062..0d3b5d9895 100644
--- a/core/modules/layout_builder/tests/src/Kernel/LayoutEntityHelperTraitTest.php
+++ b/core/modules/layout_builder/tests/src/Kernel/LayoutEntityHelperTraitTest.php
@@ -189,7 +189,7 @@ public function testOriginalEntityUsesDefaultStorage($entity_storages, $is_new,
       $entity->save();
       if ($has_original) {
         $original_entity = EntityTest::create(['name' => 'original']);
-        $entity->original = $original_entity;
+        $entity->setOriginalDefaultRevision($original_entity);
       }
 
     }
diff --git a/core/modules/locale/src/LocaleEvent.php b/core/modules/locale/src/LocaleEvent.php
index 8851dddc46..150b9f1744 100644
--- a/core/modules/locale/src/LocaleEvent.php
+++ b/core/modules/locale/src/LocaleEvent.php
@@ -21,7 +21,7 @@ class LocaleEvent extends Event {
    *
    * @var string[]
    */
-  protected $original;
+  protected array $lids;
 
   /**
    * Constructs a new LocaleEvent.
diff --git a/core/modules/media/src/Entity/Media.php b/core/modules/media/src/Entity/Media.php
index 76739dbe48..ad96c251c2 100644
--- a/core/modules/media/src/Entity/Media.php
+++ b/core/modules/media/src/Entity/Media.php
@@ -273,7 +273,7 @@ protected function getThumbnailUri($from_queue) {
    */
   protected function hasSourceFieldChanged() {
     $source = $this->getSource();
-    return isset($this->original) && $source->getSourceFieldValue($this) !== $source->getSourceFieldValue($this->original);
+    return $this->getOriginalDefaultRevision() && $source->getSourceFieldValue($this) !== $source->getSourceFieldValue($this->getOriginalDefaultRevision());
   }
 
   /**
@@ -326,13 +326,13 @@ public function preSaveRevision(EntityStorageInterface $storage, \stdClass $reco
     parent::preSaveRevision($storage, $record);
 
     $is_new_revision = $this->isNewRevision();
-    if (!$is_new_revision && isset($this->original) && empty($record->revision_log_message)) {
+    if (!$is_new_revision && $this->getOriginalDefaultRevision() && empty($record->revision_log_message)) {
       // If we are updating an existing media item without adding a
       // new revision, we need to make sure $entity->revision_log_message is
       // reset whenever it is empty.
       // Therefore, this code allows us to avoid clobbering an existing log
       // entry with an empty one.
-      $record->revision_log_message = $this->original->revision_log_message->value;
+      $record->revision_log_message = $this->getOriginalDefaultRevision()->revision_log_message->value;
     }
 
     if ($is_new_revision) {
@@ -359,13 +359,14 @@ public function prepareSave() {
     // operations during entity save. See
     // https://www.drupal.org/project/drupal/issues/2976875 for more.
 
-    // In order for metadata to be mapped correctly, $this->original must be
+    // In order for metadata to be mapped correctly, the original entity must be
     // set. However, that is only set once parent::save() is called, so work
     // around that by setting it here.
-    if (!isset($this->original) && $id = $this->id()) {
-      $this->original = $this->entityTypeManager()
+    if (!$this->getOriginalDefaultRevision() && $id = $this->id()) {
+      $this->setOriginalDefaultRevision($this->entityTypeManager()
         ->getStorage('media')
-        ->loadUnchanged($id);
+        ->loadUnchanged($id)
+      );
     }
 
     $media_source = $this->getSource();
diff --git a/core/modules/menu_link_content/menu_link_content.module b/core/modules/menu_link_content/menu_link_content.module
index a593bef4e3..25d9ce477d 100644
--- a/core/modules/menu_link_content/menu_link_content.module
+++ b/core/modules/menu_link_content/menu_link_content.module
@@ -79,11 +79,11 @@ function _menu_link_content_update_path_alias($path) {
  * Implements hook_ENTITY_TYPE_update() for 'path_alias'.
  */
 function menu_link_content_path_alias_update(PathAliasInterface $path_alias) {
-  if ($path_alias->getAlias() != $path_alias->original->getAlias()) {
+  if ($path_alias->getAlias() != $path_alias->getOriginalDefaultRevision()->getAlias()) {
     _menu_link_content_update_path_alias($path_alias->getAlias());
-    _menu_link_content_update_path_alias($path_alias->original->getAlias());
+    _menu_link_content_update_path_alias($path_alias->getOriginalDefaultRevision()->getAlias());
   }
-  elseif ($path_alias->getPath() != $path_alias->original->getPath()) {
+  elseif ($path_alias->getPath() != $path_alias->getOriginalDefaultRevision()->getPath()) {
     _menu_link_content_update_path_alias($path_alias->getAlias());
   }
 }
diff --git a/core/modules/migrate/src/Plugin/Migration.php b/core/modules/migrate/src/Plugin/Migration.php
index 01ae6aea58..281e446ae6 100644
--- a/core/modules/migrate/src/Plugin/Migration.php
+++ b/core/modules/migrate/src/Plugin/Migration.php
@@ -327,6 +327,19 @@ class Migration extends PluginBase implements MigrationInterface, RequirementsIn
     self::STATUS_DISABLED => 'Disabled',
   ];
 
+  protected $class;
+  // phpcs:disable Drupal.Classes.PropertyDeclaration
+  protected $_discovered_file_path;
+  protected $deriver;
+  protected $target_types;
+  protected $field_plugin_method;
+
+  /**
+   * Drupal\Tests\migrate\Kernel\MigrateSkipRowTest.
+   */
+  protected $load;
+  public $provider;
+
   /**
    * Constructs a Migration.
    *
diff --git a/core/modules/migrate/src/Plugin/migrate/destination/Entity.php b/core/modules/migrate/src/Plugin/migrate/destination/Entity.php
index 0e9668b54f..3a2f93be4d 100644
--- a/core/modules/migrate/src/Plugin/migrate/destination/Entity.php
+++ b/core/modules/migrate/src/Plugin/migrate/destination/Entity.php
@@ -4,6 +4,7 @@
 
 use Drupal\Component\Plugin\DependentPluginInterface;
 use Drupal\Core\Entity\DependencyTrait;
+use Drupal\Core\Entity\EntityFieldManagerInterface;
 use Drupal\Core\Entity\EntityStorageInterface;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\migrate\EntityFieldDefinitionTrait;
@@ -70,6 +71,11 @@ abstract class Entity extends DestinationBase implements ContainerFactoryPluginI
    */
   protected $storage;
 
+  /**
+   * The entity field manager.
+   */
+  protected EntityFieldManagerInterface $entityFieldManager;
+
   /**
    * The list of the bundles of this entity type.
    *
diff --git a/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php b/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php
index 9d5e231c3f..da987d5223 100644
--- a/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php
+++ b/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php
@@ -93,13 +93,6 @@
  */
 class EntityContentBase extends Entity implements HighestIdInterface, MigrateValidatableEntityInterface {
 
-  /**
-   * Entity field manager.
-   *
-   * @var \Drupal\Core\Entity\EntityFieldManagerInterface
-   */
-  protected $entityFieldManager;
-
   /**
    * Field type plugin manager.
    *
diff --git a/core/modules/migrate/src/Plugin/migrate/process/Route.php b/core/modules/migrate/src/Plugin/migrate/process/Route.php
index 63c1020072..90f5d96ef5 100644
--- a/core/modules/migrate/src/Plugin/migrate/process/Route.php
+++ b/core/modules/migrate/src/Plugin/migrate/process/Route.php
@@ -57,6 +57,11 @@
  */
 class Route extends ProcessPluginBase implements ContainerFactoryPluginInterface {
 
+  /**
+   * The current migration.
+   */
+  protected MigrationInterface $migration;
+
   /**
    * The path validator service.
    *
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/FieldMigration.php b/core/modules/migrate_drupal/src/Plugin/migrate/FieldMigration.php
index 97eab7e76c..d3f6ad4c88 100644
--- a/core/modules/migrate_drupal/src/Plugin/migrate/FieldMigration.php
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/FieldMigration.php
@@ -21,6 +21,7 @@ class FieldMigration extends Migration implements ContainerFactoryPluginInterfac
    * @var bool
    */
   protected $init = FALSE;
+  protected $field_plugin_method;
 
   /**
    * The migration field discovery service.
diff --git a/core/modules/node/node.admin.inc b/core/modules/node/node.admin.inc
index ff5f833190..10e0da228d 100644
--- a/core/modules/node/node.admin.inc
+++ b/core/modules/node/node.admin.inc
@@ -82,7 +82,7 @@ function node_mass_update(array $nodes, array $updates, $langcode = NULL, $load
 function _node_mass_update_helper(NodeInterface $node, array $updates, $langcode = NULL) {
   $langcodes = isset($langcode) ? [$langcode] : array_keys($node->getTranslationLanguages());
   // For efficiency manually save the original node before applying any changes.
-  $node->original = clone $node;
+  $node->setOriginalDefaultRevision(clone $node);
   foreach ($langcodes as $langcode) {
     foreach ($updates as $name => $value) {
       $node->getTranslation($langcode)->$name = $value;
diff --git a/core/modules/node/src/Entity/Node.php b/core/modules/node/src/Entity/Node.php
index fdfa6f60dc..8acc0a455a 100644
--- a/core/modules/node/src/Entity/Node.php
+++ b/core/modules/node/src/Entity/Node.php
@@ -124,12 +124,12 @@ public function preSave(EntityStorageInterface $storage) {
   public function preSaveRevision(EntityStorageInterface $storage, \stdClass $record) {
     parent::preSaveRevision($storage, $record);
 
-    if (!$this->isNewRevision() && isset($this->original) && (!isset($record->revision_log) || $record->revision_log === '')) {
+    if (!$this->isNewRevision() && $this->getOriginalDefaultRevision() && (!isset($record->revision_log) || $record->revision_log === '')) {
       // If we are updating an existing node without adding a new revision, we
       // need to make sure $entity->revision_log is reset whenever it is empty.
       // Therefore, this code allows us to avoid clobbering an existing log
       // entry with an empty one.
-      $record->revision_log = $this->original->revision_log->value;
+      $record->revision_log = $this->getOriginalDefaultRevision()->revision_log->value;
     }
   }
 
diff --git a/core/modules/node/tests/modules/node_test/node_test.module b/core/modules/node/tests/modules/node_test/node_test.module
index b62138d1ea..faf7025130 100644
--- a/core/modules/node/tests/modules/node_test/node_test.module
+++ b/core/modules/node/tests/modules/node_test/node_test.module
@@ -134,8 +134,8 @@ function node_test_node_presave(NodeInterface $node) {
     $node->changed = 979534800;
   }
   // Determine changes.
-  if (!empty($node->original) && $node->original->getTitle() == 'test_changes') {
-    if ($node->original->getTitle() != $node->getTitle()) {
+  if ($node->getOriginalDefaultRevision() && $node->getOriginalDefaultRevision()->getTitle() == 'test_changes') {
+    if ($node->getOriginalDefaultRevision()->getTitle() != $node->getTitle()) {
       $node->title->value .= '_presave';
     }
   }
@@ -146,8 +146,8 @@ function node_test_node_presave(NodeInterface $node) {
  */
 function node_test_node_update(NodeInterface $node) {
   // Determine changes on update.
-  if (!empty($node->original) && $node->original->getTitle() == 'test_changes') {
-    if ($node->original->getTitle() != $node->getTitle()) {
+  if ($node->getOriginalDefaultRevision() && $node->getOriginalDefaultRevision()->getTitle() == 'test_changes') {
+    if ($node->getOriginalDefaultRevision()->getTitle() != $node->getTitle()) {
       $node->title->value .= '_update';
     }
   }
diff --git a/core/modules/path_alias/src/Entity/PathAlias.php b/core/modules/path_alias/src/Entity/PathAlias.php
index aabbaaff1e..41469f1262 100644
--- a/core/modules/path_alias/src/Entity/PathAlias.php
+++ b/core/modules/path_alias/src/Entity/PathAlias.php
@@ -109,7 +109,7 @@ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
     $alias_manager = \Drupal::service('path_alias.manager');
     $alias_manager->cacheClear($this->getPath());
     if ($update) {
-      $alias_manager->cacheClear($this->original->getPath());
+      $alias_manager->cacheClear($this->getOriginalDefaultRevision()->getPath());
     }
   }
 
diff --git a/core/modules/system/src/Entity/Action.php b/core/modules/system/src/Entity/Action.php
index 26c9c39bd3..dc53ee24c6 100644
--- a/core/modules/system/src/Entity/Action.php
+++ b/core/modules/system/src/Entity/Action.php
@@ -79,6 +79,12 @@ class Action extends ConfigEntityBase implements ActionConfigEntityInterface, En
    * @var \Drupal\Core\Action\ActionPluginCollection
    */
   protected $pluginCollection;
+  protected $url;
+  protected $submit;
+  protected $form_build_id;
+  protected $form_token;
+  protected $form_id;
+  protected $confirm;
 
   /**
    * Encapsulates the creation of the action's LazyPluginCollection.
diff --git a/core/modules/system/tests/modules/accept_header_routing_test/src/AcceptHeaderMiddleware.php b/core/modules/system/tests/modules/accept_header_routing_test/src/AcceptHeaderMiddleware.php
index 112b610179..3d01aa22ef 100644
--- a/core/modules/system/tests/modules/accept_header_routing_test/src/AcceptHeaderMiddleware.php
+++ b/core/modules/system/tests/modules/accept_header_routing_test/src/AcceptHeaderMiddleware.php
@@ -11,6 +11,11 @@
  */
 class AcceptHeaderMiddleware implements HttpKernelInterface {
 
+  /**
+   * The app kernel.
+   */
+  protected HttpKernelInterface $app;
+
   /**
    * Constructs a new AcceptHeaderMiddleware instance.
    *
diff --git a/core/modules/system/tests/modules/entity_test/src/TypedData/ComputedString.php b/core/modules/system/tests/modules/entity_test/src/TypedData/ComputedString.php
index a8175263b3..25b1045054 100644
--- a/core/modules/system/tests/modules/entity_test/src/TypedData/ComputedString.php
+++ b/core/modules/system/tests/modules/entity_test/src/TypedData/ComputedString.php
@@ -11,6 +11,11 @@
  */
 class ComputedString extends TypedData implements CacheableDependencyInterface {
 
+  /**
+   * Drupal\Tests\jsonapi\Kernel\Normalizer\FieldItemNormalizerTest.
+   */
+  protected $value;
+
   /**
    * {@inheritdoc}
    */
diff --git a/core/modules/system/tests/modules/error_service_test/src/Controller/LonelyMonkeyController.php b/core/modules/system/tests/modules/error_service_test/src/Controller/LonelyMonkeyController.php
index 4946417a45..5a47af52b0 100644
--- a/core/modules/system/tests/modules/error_service_test/src/Controller/LonelyMonkeyController.php
+++ b/core/modules/system/tests/modules/error_service_test/src/Controller/LonelyMonkeyController.php
@@ -12,6 +12,11 @@
  */
 class LonelyMonkeyController extends ControllerBase implements ContainerInjectionInterface {
 
+  /**
+   * The lonely monkey class.
+   */
+  protected LonelyMonkeyClass $class;
+
   public function __construct(LonelyMonkeyClass $class) {
     $this->class = $class;
   }
diff --git a/core/modules/system/tests/modules/error_service_test/src/LonelyMonkeyClass.php b/core/modules/system/tests/modules/error_service_test/src/LonelyMonkeyClass.php
index bbe1d6a191..f033899306 100644
--- a/core/modules/system/tests/modules/error_service_test/src/LonelyMonkeyClass.php
+++ b/core/modules/system/tests/modules/error_service_test/src/LonelyMonkeyClass.php
@@ -9,6 +9,11 @@
  */
 class LonelyMonkeyClass {
 
+  /**
+   * The database connection.
+   */
+  protected Connection $connection;
+
   public function __construct(Connection $connection) {
     $this->connection = $connection;
   }
diff --git a/core/modules/system/tests/modules/error_service_test/src/MonkeysInTheControlRoom.php b/core/modules/system/tests/modules/error_service_test/src/MonkeysInTheControlRoom.php
index 7df8d810f9..2d08efc6fc 100644
--- a/core/modules/system/tests/modules/error_service_test/src/MonkeysInTheControlRoom.php
+++ b/core/modules/system/tests/modules/error_service_test/src/MonkeysInTheControlRoom.php
@@ -21,6 +21,11 @@ class MonkeysInTheControlRoom implements HttpKernelInterface {
    */
   protected $app;
 
+  /**
+   * The settings.
+   */
+  protected Settings $settings;
+
   /**
    * MonkeysInTheControlRoom constructor.
    *
diff --git a/core/modules/system/tests/src/Functional/Database/FakeRecord.php b/core/modules/system/tests/src/Functional/Database/FakeRecord.php
index e14f0cf7a3..90853e77bd 100644
--- a/core/modules/system/tests/src/Functional/Database/FakeRecord.php
+++ b/core/modules/system/tests/src/Functional/Database/FakeRecord.php
@@ -17,6 +17,8 @@ class FakeRecord {
    * @var int
    */
   public $fakeArg;
+  public $name;
+  public $job;
 
   /**
    * Constructs a FakeRecord object with an optional constructor argument.
diff --git a/core/modules/system/tests/src/Kernel/DecoratedServiceTest.php b/core/modules/system/tests/src/Kernel/DecoratedServiceTest.php
index 854662df18..099019da51 100644
--- a/core/modules/system/tests/src/Kernel/DecoratedServiceTest.php
+++ b/core/modules/system/tests/src/Kernel/DecoratedServiceTest.php
@@ -22,12 +22,16 @@ class DecoratedServiceTest extends KernelTestBase {
   public function testDecoratedServiceId() {
     // Service decorated once.
     $test_service = $this->container->get('test_service');
-    $this->assertEquals('test_service', $test_service->_serviceId);
+    $hash = $this->container->generateServiceIdHash($test_service);
+    $mappings = $this->container->getServiceIdMappings();
+    $this->assertEquals('test_service', $mappings[$hash]);
     $this->assertInstanceOf(TestServiceDecorator::class, $test_service);
 
     // Service decorated twice.
     $test_service2 = $this->container->get('test_service2');
-    $this->assertEquals('test_service2', $test_service2->_serviceId);
+    $hash = $this->container->generateServiceIdHash($test_service2);
+    $mappings = $this->container->getServiceIdMappings();
+    $this->assertEquals('test_service2', $mappings[$hash]);
     $this->assertInstanceOf(TestServiceDecorator::class, $test_service2);
   }
 
diff --git a/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWidget.php b/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWidget.php
index 11e84f1c3e..01ca61bd59 100644
--- a/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWidget.php
+++ b/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWidget.php
@@ -46,7 +46,9 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen
    * {@inheritdoc}
    */
   public function errorElement(array $element, ConstraintViolationInterface $violation, array $form, FormStateInterface $form_state) {
-    if ($violation->arrayPropertyPath == ['format'] && isset($element['format']['#access']) && !$element['format']['#access']) {
+    $property_path = $this->getPropertyPathArray($violation);
+    array_shift($property_path);
+    if ($property_path == ['format'] && isset($element['format']['#access']) && !$element['format']['#access']) {
       // Ignore validation errors for formats if formats may not be changed,
       // such as when existing formats become invalid.
       // See \Drupal\filter\Element\TextFormat::processFormat().
diff --git a/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWithSummaryWidget.php b/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWithSummaryWidget.php
index 1dcb00b96b..86091fb73b 100644
--- a/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWithSummaryWidget.php
+++ b/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWithSummaryWidget.php
@@ -100,7 +100,8 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen
    */
   public function errorElement(array $element, ConstraintViolationInterface $violation, array $form, FormStateInterface $form_state) {
     $element = parent::errorElement($element, $violation, $form, $form_state);
-    return ($element === FALSE) ? FALSE : $element[$violation->arrayPropertyPath[0]];
+    $property_path = $this->getPropertyPathArray($violation);
+    return ($element === FALSE) ? FALSE : $element[$property_path[1]];
   }
 
 }
diff --git a/core/modules/text/src/Plugin/Field/FieldWidget/TextfieldWidget.php b/core/modules/text/src/Plugin/Field/FieldWidget/TextfieldWidget.php
index e6954cc1df..2c5531604a 100644
--- a/core/modules/text/src/Plugin/Field/FieldWidget/TextfieldWidget.php
+++ b/core/modules/text/src/Plugin/Field/FieldWidget/TextfieldWidget.php
@@ -37,7 +37,9 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen
    * {@inheritdoc}
    */
   public function errorElement(array $element, ConstraintViolationInterface $violation, array $form, FormStateInterface $form_state) {
-    if ($violation->arrayPropertyPath == ['format'] && isset($element['format']['#access']) && !$element['format']['#access']) {
+    $property_path = $this->getPropertyPathArray($violation);
+    array_shift($property_path);
+    if ($property_path == ['format'] && isset($element['format']['#access']) && !$element['format']['#access']) {
       // Ignore validation errors for formats that may not be changed,
       // such as when existing formats become invalid.
       // See \Drupal\filter\Element\TextFormat::processFormat().
diff --git a/core/modules/update/src/UpdateProcessor.php b/core/modules/update/src/UpdateProcessor.php
index 3f6b24ffba..a07a47c8f5 100644
--- a/core/modules/update/src/UpdateProcessor.php
+++ b/core/modules/update/src/UpdateProcessor.php
@@ -78,6 +78,11 @@ class UpdateProcessor implements UpdateProcessorInterface {
    */
   protected $privateKey;
 
+  /**
+   * The queue for fetching release history data.
+   */
+  protected array $fetchTasks;
+
   /**
    * Constructs an UpdateProcessor.
    *
diff --git a/core/modules/user/src/Entity/Role.php b/core/modules/user/src/Entity/Role.php
index f65af51088..af05336658 100644
--- a/core/modules/user/src/Entity/Role.php
+++ b/core/modules/user/src/Entity/Role.php
@@ -169,7 +169,7 @@ public static function postLoad(EntityStorageInterface $storage, array &$entitie
     parent::postLoad($storage, $entities);
     // Sort the queried roles by their weight.
     // See \Drupal\Core\Config\Entity\ConfigEntityBase::sort().
-    uasort($entities, 'static::sort');
+    uasort($entities, [static::class, 'sort']);
   }
 
   /**
diff --git a/core/modules/user/src/Entity/User.php b/core/modules/user/src/Entity/User.php
index 1e41b11efc..b54dada0ca 100644
--- a/core/modules/user/src/Entity/User.php
+++ b/core/modules/user/src/Entity/User.php
@@ -74,6 +74,7 @@ class User extends ContentEntityBase implements UserInterface {
    * @var \Drupal\user\UserInterface
    */
   protected static $anonymousUser;
+  public $_skipProtectedUserFieldConstraint;
 
   /**
    * {@inheritdoc}
@@ -120,7 +121,7 @@ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
       $session_manager = \Drupal::service('session_manager');
       // If the password has been changed, delete all open sessions for the
       // user and recreate the current one.
-      if ($this->pass->value != $this->original->pass->value) {
+      if ($this->pass->value != $this->getOriginalDefaultRevision()->pass->value) {
         $session_manager->delete($this->id());
         if ($this->id() == \Drupal::currentUser()->id()) {
           \Drupal::service('session')->migrate();
@@ -128,12 +129,12 @@ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
       }
 
       // If the user was blocked, delete the user's sessions to force a logout.
-      if ($this->original->status->value != $this->status->value && $this->status->value == 0) {
+      if ($this->getOriginalDefaultRevision()->status->value != $this->status->value && $this->status->value == 0) {
         $session_manager->delete($this->id());
       }
 
       // Send emails after we have the new user object.
-      if ($this->status->value != $this->original->status->value) {
+      if ($this->status->value != $this->getOriginalDefaultRevision()->status->value) {
         // The user's status is changing; conditionally send notification email.
         $op = $this->status->value == 1 ? 'status_activated' : 'status_blocked';
         _user_mail_notify($op, $this);
diff --git a/core/modules/user/src/Plugin/Action/AddRoleUser.php b/core/modules/user/src/Plugin/Action/AddRoleUser.php
index 6980ff9b44..40bca03771 100644
--- a/core/modules/user/src/Plugin/Action/AddRoleUser.php
+++ b/core/modules/user/src/Plugin/Action/AddRoleUser.php
@@ -22,7 +22,7 @@ public function execute($account = NULL) {
     if ($account !== FALSE && !$account->hasRole($rid)) {
       // For efficiency manually save the original account before applying
       // any changes.
-      $account->original = clone $account;
+      $account->setOriginalDefaultRevision(clone $account);
       $account->addRole($rid);
       $account->save();
     }
diff --git a/core/modules/user/src/Plugin/Action/BlockUser.php b/core/modules/user/src/Plugin/Action/BlockUser.php
index 6a875f78d9..56308d0f30 100644
--- a/core/modules/user/src/Plugin/Action/BlockUser.php
+++ b/core/modules/user/src/Plugin/Action/BlockUser.php
@@ -24,7 +24,7 @@ public function execute($account = NULL) {
     if ($account !== FALSE && $account->isActive()) {
       // For efficiency manually save the original account before applying any
       // changes.
-      $account->original = clone $account;
+      $account->setOriginalDefaultRevision(clone $account);
       $account->block();
       $account->save();
     }
diff --git a/core/modules/user/src/Plugin/Action/RemoveRoleUser.php b/core/modules/user/src/Plugin/Action/RemoveRoleUser.php
index 66cf6d0f36..21f41e13c4 100644
--- a/core/modules/user/src/Plugin/Action/RemoveRoleUser.php
+++ b/core/modules/user/src/Plugin/Action/RemoveRoleUser.php
@@ -22,7 +22,7 @@ public function execute($account = NULL) {
     if ($account !== FALSE && $account->hasRole($rid)) {
       // For efficiency manually save the original account before applying
       // any changes.
-      $account->original = clone $account;
+      $account->setOriginalDefaultRevision(clone $account);
       $account->removeRole($rid);
       $account->save();
     }
diff --git a/core/modules/user/src/Plugin/views/filter/Name.php b/core/modules/user/src/Plugin/views/filter/Name.php
index 3ad018fa55..9b4158bea1 100644
--- a/core/modules/user/src/Plugin/views/filter/Name.php
+++ b/core/modules/user/src/Plugin/views/filter/Name.php
@@ -18,6 +18,11 @@ class Name extends InOperator {
 
   protected $alwaysMultiple = TRUE;
 
+  /**
+   * The validated exposed input.
+   */
+  protected array $validated_exposed_input;
+
   protected function valueForm(&$form, FormStateInterface $form_state) {
     $users = $this->value ? User::loadMultiple($this->value) : [];
     $default_value = EntityAutocomplete::getEntityLabels($users);
diff --git a/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php b/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php
index d05ac030e9..6a6e9f0ec3 100644
--- a/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php
+++ b/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php
@@ -3,6 +3,7 @@
 namespace Drupal\Tests\user\Unit\Plugin\Validation\Constraint;
 
 use Drupal\Tests\UnitTestCase;
+use Drupal\user\Entity\User;
 use Drupal\user\Plugin\Validation\Constraint\ProtectedUserFieldConstraint;
 use Drupal\user\Plugin\Validation\Constraint\ProtectedUserFieldConstraintValidator;
 use Symfony\Component\Validator\Context\ExecutionContextInterface;
@@ -87,7 +88,7 @@ public function providerTestValidate() {
 
     // Case 3: Account flagged to skip protected user should be ignored.
     $field_definition = $this->createMock('Drupal\Core\Field\FieldDefinitionInterface');
-    $account = $this->createMock('Drupal\user\UserInterface');
+    $account = $this->createMock(User::class);
     $account->_skipProtectedUserFieldConstraint = TRUE;
     $items = $this->createMock('Drupal\Core\Field\FieldItemListInterface');
     $items->expects($this->once())
diff --git a/core/modules/views/src/Entity/View.php b/core/modules/views/src/Entity/View.php
index fbb159bdcc..bd92745884 100644
--- a/core/modules/views/src/Entity/View.php
+++ b/core/modules/views/src/Entity/View.php
@@ -352,7 +352,7 @@ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
     $this->invalidateCaches();
 
     // Rebuild the router if this is a new view, or its status changed.
-    if (!isset($this->original) || ($this->status() != $this->original->status())) {
+    if (!$this->getOriginalDefaultRevision() || ($this->status() != $this->getOriginalDefaultRevision()->status())) {
       \Drupal::service('router.builder')->setRebuildNeeded();
     }
   }
diff --git a/core/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php b/core/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php
index 825a6407d1..9c008ef728 100644
--- a/core/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php
+++ b/core/modules/views/src/EventSubscriber/ViewsEntitySchemaSubscriber.php
@@ -83,6 +83,13 @@ class ViewsEntitySchemaSubscriber implements EntityTypeListenerInterface, EventS
    */
   protected $logger;
 
+  /**
+   * Indexed array by view name that require to save.
+   *
+   * @var \Drupal\views\ViewEntityInterface[]
+   */
+  protected $viewsToSave = [];
+
   /**
    * Constructs a ViewsEntitySchemaSubscriber.
    *
@@ -208,17 +215,12 @@ public function onEntityTypeUpdate(EntityTypeInterface $entity_type, EntityTypeI
       }
     }
 
-    // Filter the list of views that needs to be updated.
-    $views_to_update = array_filter($all_views, function (ViewEntityInterface $view) {
-      return $view->get('_updated') === TRUE;
-    });
-    foreach ($views_to_update as $view) {
+    foreach ($this->viewsToSave as $view) {
       try {
         // All changes done to the views here can be trusted and this might be
         // called during updates, when it is not safe to rely on configuration
         // containing valid schema. Trust the data and disable schema validation
         // and casting.
-        $view->set('_updated', NULL);
         $view->trustData()->save();
       }
       catch (\Exception $e) {
@@ -231,6 +233,7 @@ public function onEntityTypeUpdate(EntityTypeInterface $entity_type, EntityTypeI
         ]);
       }
     }
+    $this->viewsToSave = [];
   }
 
   /**
@@ -300,14 +303,14 @@ protected function baseTableRename($all_views, $entity_type_id, $old_base_table,
     foreach ($all_views as $view) {
       if ($view->get('base_table') == $old_base_table) {
         $view->set('base_table', $new_base_table);
-        $view->set('_updated', TRUE);
+        $this->viewsToSave[$view->id()] = $view;
       }
     }
 
     $this->processHandlers($all_views, function (&$handler_config, ViewEntityInterface $view) use ($entity_type_id, $old_base_table, $new_base_table) {
       if (isset($handler_config['entity_type']) && $handler_config['entity_type'] == $entity_type_id && $handler_config['table'] == $old_base_table) {
         $handler_config['table'] = $new_base_table;
-        $view->set('_updated', TRUE);
+        $this->viewsToSave[$view->id()] = $view;
       }
     });
   }
@@ -328,14 +331,14 @@ protected function dataTableRename($all_views, $entity_type_id, $old_data_table,
     foreach ($all_views as $view) {
       if ($view->get('base_table') == $old_data_table) {
         $view->set('base_table', $new_data_table);
-        $view->set('_updated', TRUE);
+        $this->viewsToSave[$view->id()] = $view;
       }
     }
 
     $this->processHandlers($all_views, function (&$handler_config, ViewEntityInterface $view) use ($entity_type_id, $old_data_table, $new_data_table) {
       if (isset($handler_config['entity_type']) && $handler_config['entity_type'] == $entity_type_id && $handler_config['table'] == $old_data_table) {
         $handler_config['table'] = $new_data_table;
-        $view->set('_updated', TRUE);
+        $this->viewsToSave[$view->id()] = $view;
       }
     });
   }
@@ -368,7 +371,7 @@ protected function dataTableAddition($all_views, EntityTypeInterface $entity_typ
         // Move all fields which just exists on the data table.
         if ($handler_config['table'] == $base_table && in_array($handler_config['entity_field'], $data_table_fields) && !in_array($handler_config['entity_field'], $base_table_fields)) {
           $handler_config['table'] = $data_table;
-          $view->set('_updated', TRUE);
+          $this->viewsToSave[$view->id()] = $view;
         }
       }
     });
@@ -392,7 +395,7 @@ protected function dataTableRemoval($all_views, $entity_type_id, $old_data_table
       if (isset($handler_config['entity_type']) && $handler_config['entity_type'] == $entity_type_id) {
         if ($handler_config['table'] == $old_data_table) {
           $handler_config['table'] = $base_table;
-          $view->set('_updated', TRUE);
+          $this->viewsToSave[$view->id()] = $view;
         }
       }
     });
@@ -414,7 +417,7 @@ protected function revisionRemoval($all_views, EntityTypeInterface $original) {
       if (in_array($view->get('base_table'), [$revision_base_table, $revision_data_table])) {
         // Let's disable the views as we no longer support revisions.
         $view->setStatus(FALSE);
-        $view->set('_updated', TRUE);
+        $this->viewsToSave[$view->id()] = $view;
       }
 
       // For any kind of field, let's rely on the broken handler functionality.
diff --git a/core/modules/views/src/ManyToOneHelper.php b/core/modules/views/src/ManyToOneHelper.php
index 06ee0d2bc1..35e984814e 100644
--- a/core/modules/views/src/ManyToOneHelper.php
+++ b/core/modules/views/src/ManyToOneHelper.php
@@ -21,6 +21,15 @@
  */
 class ManyToOneHelper {
 
+  /**
+   * Should the field to use formula or alias.
+   *
+   * @see \Drupal\views\ManyToOneHelper::getField()
+   *
+   * @var bool
+   */
+  public $formula = FALSE;
+
   /**
    * The handler.
    */
diff --git a/core/modules/views/src/Plugin/views/PluginBase.php b/core/modules/views/src/Plugin/views/PluginBase.php
index 1d5afc118c..a935b8d5d7 100644
--- a/core/modules/views/src/Plugin/views/PluginBase.php
+++ b/core/modules/views/src/Plugin/views/PluginBase.php
@@ -37,6 +37,7 @@
  *
  * @ingroup views_plugins
  */
+#[\AllowDynamicProperties]
 abstract class PluginBase extends ComponentPluginBase implements ContainerFactoryPluginInterface, ViewsPluginInterface, DependentPluginInterface, TrustedCallbackInterface {
 
   /**
@@ -134,6 +135,7 @@ public static function create(ContainerInterface $container, array $configuratio
    */
   public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
     $this->view = $view;
+    $this->options = $this->options ?? [];
     $this->setOptionDefaults($this->options, $this->defineOptions());
     $this->displayHandler = $display;
 
diff --git a/core/modules/views/src/Plugin/views/filter/Date.php b/core/modules/views/src/Plugin/views/filter/Date.php
index 9aa8168f08..e15f0b2493 100644
--- a/core/modules/views/src/Plugin/views/filter/Date.php
+++ b/core/modules/views/src/Plugin/views/filter/Date.php
@@ -111,7 +111,7 @@ protected function hasValidGroupedValue(array $group) {
     // one greater.
     $operators = $this->operators();
     $expected = $operators[$group['operator']]['values'] + 1;
-    $actual = count(array_filter($group['value'], 'static::arrayFilterZero'));
+    $actual = count(array_filter($group['value'], [static::class, 'arrayFilterZero']));
 
     return $actual == $expected;
   }
diff --git a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php
index 6401fe0143..1da612333e 100644
--- a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php
+++ b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php
@@ -704,7 +704,7 @@ protected function hasValidGroupedValue(array $group) {
         // types). Ensure at least the minimum number of values is present for
         // this entry to be considered valid.
         $min_values = $operators[$group['operator']]['values'];
-        $actual_values = count(array_filter($group['value'], 'static::arrayFilterZero'));
+        $actual_values = count(array_filter($group['value'], [static::class, 'arrayFilterZero']));
         return $actual_values >= $min_values;
       }
     }
diff --git a/core/modules/views/src/Plugin/views/filter/ManyToOne.php b/core/modules/views/src/Plugin/views/filter/ManyToOne.php
index 1b3810cfe6..9fd8a42fe8 100644
--- a/core/modules/views/src/Plugin/views/filter/ManyToOne.php
+++ b/core/modules/views/src/Plugin/views/filter/ManyToOne.php
@@ -132,7 +132,7 @@ protected function opHelper() {
     }
     // Form API returns unchecked options in the form of option_id => 0. This
     // breaks the generated query for "is all of" filters so we remove them.
-    $this->value = array_filter($this->value, 'static::arrayFilterZero');
+    $this->value = array_filter($this->value, [static::class, 'arrayFilterZero']);
     $this->helper->addFilter();
   }
 
diff --git a/core/modules/views/src/Plugin/views/join/JoinPluginBase.php b/core/modules/views/src/Plugin/views/join/JoinPluginBase.php
index 57c18eeee1..14137a8c4f 100644
--- a/core/modules/views/src/Plugin/views/join/JoinPluginBase.php
+++ b/core/modules/views/src/Plugin/views/join/JoinPluginBase.php
@@ -150,6 +150,7 @@
  *
  * Extensions of this class can be used to create more interesting joins.
  */
+#[\AllowDynamicProperties]
 class JoinPluginBase extends PluginBase implements JoinPluginInterface {
 
   /**
diff --git a/core/modules/views/src/Plugin/views/query/QueryPluginBase.php b/core/modules/views/src/Plugin/views/query/QueryPluginBase.php
index 75d5d66b64..54fe0bf10e 100644
--- a/core/modules/views/src/Plugin/views/query/QueryPluginBase.php
+++ b/core/modules/views/src/Plugin/views/query/QueryPluginBase.php
@@ -52,6 +52,11 @@ abstract class QueryPluginBase extends PluginBase implements CacheableDependency
    */
   public int $offset;
 
+  /**
+   * Controls how the WHERE and HAVING groups are put together.
+   */
+  protected string $groupOperator;
+
   /**
    * Generate a query and a countquery from all of the information supplied
    * to the object.
diff --git a/core/modules/views/src/Plugin/views/query/Sql.php b/core/modules/views/src/Plugin/views/query/Sql.php
index 4cd99a8671..3fe853ac24 100644
--- a/core/modules/views/src/Plugin/views/query/Sql.php
+++ b/core/modules/views/src/Plugin/views/query/Sql.php
@@ -58,13 +58,6 @@ class Sql extends QueryPluginBase {
    * or OR.
    */
   public $having = [];
-  /**
-   * The default operator to use when connecting the WHERE groups. May be
-   * AND or OR.
-   *
-   * @var string
-   */
-  protected $groupOperator = 'AND';
 
   /**
    * A simple array of order by clauses.
@@ -159,6 +152,8 @@ class Sql extends QueryPluginBase {
    *   The messenger.
    */
   public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, DateSqlInterface $date_sql, MessengerInterface $messenger) {
+    $this->groupOperator = 'AND';
+
     parent::__construct($configuration, $plugin_id, $plugin_definition);
 
     $this->entityTypeManager = $entity_type_manager;
diff --git a/core/modules/views/src/Plugin/views/sort/GroupByNumeric.php b/core/modules/views/src/Plugin/views/sort/GroupByNumeric.php
index 5308439e66..bbfaa63c03 100644
--- a/core/modules/views/src/Plugin/views/sort/GroupByNumeric.php
+++ b/core/modules/views/src/Plugin/views/sort/GroupByNumeric.php
@@ -3,6 +3,7 @@
 namespace Drupal\views\Plugin\views\sort;
 
 use Drupal\views\Plugin\views\display\DisplayPluginBase;
+use Drupal\views\Plugin\views\HandlerBase;
 use Drupal\views\ViewExecutable;
 use Drupal\views\Views;
 
@@ -13,6 +14,11 @@
  */
 class GroupByNumeric extends SortPluginBase {
 
+  /**
+   * The original handler.
+   */
+  protected HandlerBase $handler;
+
   /**
    * {@inheritdoc}
    */
diff --git a/core/modules/views/src/ResultRow.php b/core/modules/views/src/ResultRow.php
index 30814bf628..2399f69983 100644
--- a/core/modules/views/src/ResultRow.php
+++ b/core/modules/views/src/ResultRow.php
@@ -5,6 +5,7 @@
 /**
  * A class representing a view result row.
  */
+#[\AllowDynamicProperties]
 class ResultRow {
 
   /**
diff --git a/core/modules/views/src/ViewExecutable.php b/core/modules/views/src/ViewExecutable.php
index 77165e691c..8565566ed5 100644
--- a/core/modules/views/src/ViewExecutable.php
+++ b/core/modules/views/src/ViewExecutable.php
@@ -413,6 +413,27 @@ class ViewExecutable {
     ],
     '#cache' => [],
   ];
+  public $default_display;
+  public $execute_time;
+  public $live_preview;
+
+  /**
+   * Drupal\Tests\views\Unit\Plugin\display\PathPluginBaseTest.
+   *
+   * @see \Drupal\views\Plugin\views\display\DisplayPluginBase::initDisplay()
+   */
+  public $editing;
+
+  /**
+   * Drupal\Tests\taxonomy\Functional\Views\RelationshipRepresentativeNodeTest.
+   */
+  public $namespace;
+
+  /**
+   * Drupal\Tests\views\Functional\Plugin\ContextualFiltersStringTest.
+   */
+  public $many_to_one_count;
+  public $many_to_one_aliases;
 
   /**
    * The current user.
diff --git a/core/modules/views/src/Views.php b/core/modules/views/src/Views.php
index 03218ac94e..11b049ed27 100644
--- a/core/modules/views/src/Views.php
+++ b/core/modules/views/src/Views.php
@@ -308,7 +308,7 @@ public static function getViewsAsOptions($views_only = FALSE, $filter = 'all', $
       case 'disabled':
       case 'enabled':
         $filter = ucfirst($filter);
-        $views = call_user_func("static::get{$filter}Views");
+        $views = call_user_func(static::class . "::get{$filter}Views");
         break;
 
       default:
diff --git a/core/modules/views/src/ViewsDataHelper.php b/core/modules/views/src/ViewsDataHelper.php
index c977882d9b..f6522e46ca 100644
--- a/core/modules/views/src/ViewsDataHelper.php
+++ b/core/modules/views/src/ViewsDataHelper.php
@@ -148,7 +148,7 @@ public function fetchFields($base, $type, $grouping = FALSE, $sub_type = NULL) {
           $strings += $this->fields[$base_table][$type];
         }
       }
-      uasort($strings, ['self', 'fetchedFieldSort']);
+      uasort($strings, [self::class, 'fetchedFieldSort']);
       return $strings;
     }
 
diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php
index e2fed68ebd..fece3e1544 100644
--- a/core/modules/views_ui/src/ViewUI.php
+++ b/core/modules/views_ui/src/ViewUI.php
@@ -4,6 +4,7 @@
 
 use Drupal\Component\Utility\Html;
 use Drupal\Component\Utility\Timer;
+use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\EventSubscriber\AjaxResponseSubscriber;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Link;
@@ -85,6 +86,13 @@ class ViewUI implements ViewEntityInterface {
   public $live_preview;
 
   public $renderPreview = FALSE;
+  public $displays;
+  public $actions;
+
+  /**
+   * Drupal\Tests\views_ui\Functional\FilterUITest::testFiltersUI().
+   */
+  public $form_cache;
 
   /**
    * The View storage object.
@@ -135,6 +143,11 @@ class ViewUI implements ViewEntityInterface {
    */
   private $isUninstalling = FALSE;
 
+  /**
+   * The entity type.
+   */
+  protected string $entityType;
+
   /**
    * Constructs a View UI object.
    *
@@ -536,7 +549,6 @@ public function renderPreview($display_id, $args = []) {
     $errors = $executable->validate();
     $executable->destroy();
     if (empty($errors)) {
-      $this->ajax = TRUE;
       $executable->live_preview = TRUE;
 
       // AJAX happens via HTTP POST but everything expects exposed data to
@@ -1365,4 +1377,19 @@ public function unsetLock() {
     return $this;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function getOriginalDefaultRevision(): ?EntityInterface {
+    return $this->storage->getOriginalDefaultRevision();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setOriginalDefaultRevision(?EntityInterface $original) {
+    $this->storage->setOriginalDefaultRevision($original);
+    return $this;
+  }
+
 }
diff --git a/core/modules/views_ui/tests/src/Unit/ViewUIObjectTest.php b/core/modules/views_ui/tests/src/Unit/ViewUIObjectTest.php
index 480b679537..fb123d617e 100644
--- a/core/modules/views_ui/tests/src/Unit/ViewUIObjectTest.php
+++ b/core/modules/views_ui/tests/src/Unit/ViewUIObjectTest.php
@@ -4,6 +4,7 @@
 
 use Drupal\Core\Language\LanguageInterface;
 use Drupal\Core\TempStore\Lock;
+use Drupal\Core\Test\TestKernel;
 use Drupal\Tests\UnitTestCase;
 use Drupal\views\Entity\View;
 use Drupal\views_ui\ViewUI;
@@ -115,8 +116,7 @@ public function testIsLocked() {
    */
   public function testSerialization() {
     // Set a container so the DependencySerializationTrait has it.
-    $container = new ContainerBuilder();
-    \Drupal::setContainer($container);
+    TestKernel::setContainerWithKernel();
 
     $storage = new View([], 'view');
     $executable = $this->getMockBuilder('Drupal\views\ViewExecutable')
diff --git a/core/modules/workspaces/src/WorkspacePublisher.php b/core/modules/workspaces/src/WorkspacePublisher.php
index 1d336cfe1e..95f92ac526 100644
--- a/core/modules/workspaces/src/WorkspacePublisher.php
+++ b/core/modules/workspaces/src/WorkspacePublisher.php
@@ -111,7 +111,7 @@ public function publish() {
             $field_name = $entity->getEntityType()->getRevisionMetadataKey('workspace');
             $entity->{$field_name}->target_id = NULL;
 
-            $entity->original = $default_revisions[$entity->id()];
+            $entity->setOriginalDefaultRevision($default_revisions[$entity->id()]);
             $entity->save();
           }
         }
diff --git a/core/phpstan-baseline.neon b/core/phpstan-baseline.neon
index 797a382f0e..e39200fad5 100644
--- a/core/phpstan-baseline.neon
+++ b/core/phpstan-baseline.neon
@@ -20,51 +20,6 @@ parameters:
 			count: 1
 			path: includes/update.inc
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\Component\\\\Diff\\\\Engine\\\\DiffEngine\\:\\:\\$in_seq\\.$#"
-			count: 3
-			path: lib/Drupal/Component/Diff/Engine/DiffEngine.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\Component\\\\Diff\\\\Engine\\\\DiffEngine\\:\\:\\$lcs\\.$#"
-			count: 4
-			path: lib/Drupal/Component/Diff/Engine/DiffEngine.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\Component\\\\Diff\\\\Engine\\\\DiffEngine\\:\\:\\$seq\\.$#"
-			count: 7
-			path: lib/Drupal/Component/Diff/Engine/DiffEngine.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\Component\\\\Diff\\\\Engine\\\\DiffEngine\\:\\:\\$xchanged\\.$#"
-			count: 2
-			path: lib/Drupal/Component/Diff/Engine/DiffEngine.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\Component\\\\Diff\\\\Engine\\\\DiffEngine\\:\\:\\$xind\\.$#"
-			count: 2
-			path: lib/Drupal/Component/Diff/Engine/DiffEngine.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\Component\\\\Diff\\\\Engine\\\\DiffEngine\\:\\:\\$xv\\.$#"
-			count: 5
-			path: lib/Drupal/Component/Diff/Engine/DiffEngine.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\Component\\\\Diff\\\\Engine\\\\DiffEngine\\:\\:\\$ychanged\\.$#"
-			count: 2
-			path: lib/Drupal/Component/Diff/Engine/DiffEngine.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\Component\\\\Diff\\\\Engine\\\\DiffEngine\\:\\:\\$yind\\.$#"
-			count: 2
-			path: lib/Drupal/Component/Diff/Engine/DiffEngine.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\Component\\\\Diff\\\\Engine\\\\DiffEngine\\:\\:\\$yv\\.$#"
-			count: 5
-			path: lib/Drupal/Component/Diff/Engine/DiffEngine.php
-
 		-
 			message: "#^Method Drupal\\\\Component\\\\Gettext\\\\PoMemoryWriter\\:\\:getHeader\\(\\) should return Drupal\\\\Component\\\\Gettext\\\\PoHeader but return statement is missing\\.$#"
 			count: 1
@@ -135,11 +90,6 @@ parameters:
 			count: 3
 			path: lib/Drupal/Core/Cache/ApcuBackend.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Cache\\\\Context\\\\CacheContextsManager\\:\\:\\$validContextTokens\\.$#"
-			count: 1
-			path: lib/Drupal/Core/Cache/Context/CacheContextsManager.php
-
 		-
 			message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:10\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#"
 			count: 4
@@ -150,11 +100,6 @@ parameters:
 			count: 1
 			path: lib/Drupal/Core/Cache/MemoryBackend.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Cache\\\\PhpBackend\\:\\:\\$storage\\.$#"
-			count: 1
-			path: lib/Drupal/Core/Cache/PhpBackend.php
-
 		-
 			message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:10\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#"
 			count: 2
@@ -170,16 +115,6 @@ parameters:
 			count: 1
 			path: lib/Drupal/Core/Condition/ConditionManager.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Config\\\\Entity\\\\Query\\\\QueryFactory\\:\\:\\$configManager\\.$#"
-			count: 5
-			path: lib/Drupal/Core/Config/Entity/Query/QueryFactory.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Config\\\\Entity\\\\Query\\\\QueryFactory\\:\\:\\$keyValueFactory\\.$#"
-			count: 3
-			path: lib/Drupal/Core/Config/Entity/Query/QueryFactory.php
-
 		-
 			message: "#^Method Drupal\\\\Core\\\\Config\\\\TypedConfigManager\\:\\:replaceVariable\\(\\) should return string but return statement is missing\\.$#"
 			count: 1
@@ -195,11 +130,6 @@ parameters:
 			count: 1
 			path: lib/Drupal/Core/Database/Query/Merge.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Database\\\\Query\\\\Truncate\\:\\:\\$condition\\.$#"
-			count: 2
-			path: lib/Drupal/Core/Database/Query/Truncate.php
-
 		-
 			message: "#^Call to an undefined method Drupal\\\\Core\\\\Database\\\\Schema\\:\\:createTableSql\\(\\)\\.$#"
 			count: 1
@@ -235,11 +165,6 @@ parameters:
 			count: 1
 			path: lib/Drupal/Core/Entity/ContentEntityNullStorage.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Entity\\\\Controller\\\\EntityController\\:\\:\\$urlGenerator\\.$#"
-			count: 1
-			path: lib/Drupal/Core/Entity/Controller/EntityController.php
-
 		-
 			message: "#^Method Drupal\\\\Core\\\\Entity\\\\Controller\\\\EntityController\\:\\:deleteTitle\\(\\) should return string but return statement is missing\\.$#"
 			count: 1
@@ -255,16 +180,6 @@ parameters:
 			count: 1
 			path: lib/Drupal/Core/Entity/EntityConfirmFormBase.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Entity\\\\EntityDisplayBase\\:\\:\\$_serializedKeys\\.$#"
-			count: 2
-			path: lib/Drupal/Core/Entity/EntityDisplayBase.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Entity\\\\EntityResolverManager\\:\\:\\$entityTypes\\.$#"
-			count: 1
-			path: lib/Drupal/Core/Entity/EntityResolverManager.php
-
 		-
 			message: "#^Method Drupal\\\\Core\\\\Entity\\\\KeyValueStore\\\\KeyValueContentEntityStorage\\:\\:createTranslation\\(\\) should return Drupal\\\\Core\\\\Entity\\\\ContentEntityInterface but return statement is missing\\.$#"
 			count: 1
@@ -280,21 +195,11 @@ parameters:
 			count: 1
 			path: lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Entity\\\\Query\\\\QueryBase\\:\\:\\$conjunction\\.$#"
-			count: 1
-			path: lib/Drupal/Core/Entity/Query/QueryBase.php
-
 		-
 			message: "#^Method Drupal\\\\Core\\\\Entity\\\\Query\\\\QueryBase\\:\\:getClass\\(\\) should return string but return statement is missing\\.$#"
 			count: 1
 			path: lib/Drupal/Core/Entity/Query/QueryBase.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Entity\\\\Query\\\\Sql\\\\Query\\:\\:\\$conjunction\\.$#"
-			count: 1
-			path: lib/Drupal/Core/Entity/Query/Sql/Query.php
-
 		-
 			message: "#^Method Drupal\\\\Core\\\\Entity\\\\Sql\\\\SqlContentEntityStorageSchema\\:\\:processDataTable\\(\\) should return array but return statement is missing\\.$#"
 			count: 1
@@ -305,21 +210,11 @@ parameters:
 			count: 1
 			path: lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\EventSubscriber\\\\FinishResponseSubscriber\\:\\:\\$cacheContextsManager\\.$#"
-			count: 2
-			path: lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php
-
 		-
 			message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:10\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#"
 			count: 2
 			path: lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\EventSubscriber\\\\RedirectResponseSubscriber\\:\\:\\$requestContext\\.$#"
-			count: 2
-			path: lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php
-
 		-
 			message: "#^Call to an undefined method Drupal\\\\Core\\\\Extension\\\\Discovery\\\\RecursiveExtensionFilterIterator\\:\\:isDir\\(\\)\\.$#"
 			count: 1
@@ -375,56 +270,6 @@ parameters:
 			count: 1
 			path: lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldWidget\\\\OptionsButtonsWidget\\:\\:\\$multiple\\.$#"
-			count: 2
-			path: lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsButtonsWidget.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldWidget\\\\OptionsButtonsWidget\\:\\:\\$required\\.$#"
-			count: 2
-			path: lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsButtonsWidget.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldWidget\\\\OptionsSelectWidget\\:\\:\\$has_value\\.$#"
-			count: 1
-			path: lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsSelectWidget.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldWidget\\\\OptionsSelectWidget\\:\\:\\$multiple\\.$#"
-			count: 2
-			path: lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsSelectWidget.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldWidget\\\\OptionsSelectWidget\\:\\:\\$options\\.$#"
-			count: 1
-			path: lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsSelectWidget.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldWidget\\\\OptionsSelectWidget\\:\\:\\$required\\.$#"
-			count: 2
-			path: lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsSelectWidget.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldWidget\\\\OptionsWidgetBase\\:\\:\\$has_value\\.$#"
-			count: 1
-			path: lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldWidget\\\\OptionsWidgetBase\\:\\:\\$multiple\\.$#"
-			count: 1
-			path: lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldWidget\\\\OptionsWidgetBase\\:\\:\\$options\\.$#"
-			count: 1
-			path: lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Field\\\\Plugin\\\\Field\\\\FieldWidget\\\\OptionsWidgetBase\\:\\:\\$required\\.$#"
-			count: 1
-			path: lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php
-
 		-
 			message: "#^Method Drupal\\\\Core\\\\FileTransfer\\\\FileTransfer\\:\\:__get\\(\\) should return bool\\|string but return statement is missing\\.$#"
 			count: 1
@@ -465,11 +310,6 @@ parameters:
 			count: 1
 			path: lib/Drupal/Core/KeyValueStore/NullStorageExpirable.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Language\\\\LanguageManager\\:\\:\\$definedLanguageTypesInfo\\.$#"
-			count: 1
-			path: lib/Drupal/Core/Language/LanguageManager.php
-
 		-
 			message: "#^Method Drupal\\\\Core\\\\Lock\\\\NullLockBackend\\:\\:wait\\(\\) should return bool but return statement is missing\\.$#"
 			count: 1
@@ -515,21 +355,11 @@ parameters:
 			count: 1
 			path: lib/Drupal/Core/Template/AttributeValueBase.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Template\\\\TwigNodeVisitor\\:\\:\\$skipRenderVarFunction\\.$#"
-			count: 1
-			path: lib/Drupal/Core/Template/TwigNodeVisitor.php
-
 		-
 			message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:10\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#"
 			count: 1
 			path: lib/Drupal/Core/Template/TwigPhpStorageCache.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Test\\\\PerformanceTestRecorder\\:\\:\\$state\\.$#"
-			count: 3
-			path: lib/Drupal/Core/Test/PerformanceTestRecorder.php
-
 		-
 			message: "#^Method Drupal\\\\Core\\\\Test\\\\TestRunnerKernel\\:\\:boot\\(\\) should return \\$this\\(Drupal\\\\Core\\\\Test\\\\TestRunnerKernel\\) but return statement is missing\\.$#"
 			count: 1
@@ -560,41 +390,16 @@ parameters:
 			count: 2
 			path: lib/Drupal/Core/TypedData/TypedData.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\TypedData\\\\Validation\\\\RecursiveContextualValidator\\:\\:\\$typedDataManager\\.$#"
-			count: 2
-			path: lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php
-
 		-
 			message: "#^Method Drupal\\\\Core\\\\Update\\\\UpdateKernel\\:\\:discoverServiceProviders\\(\\) should return array but return statement is missing\\.$#"
 			count: 1
 			path: lib/Drupal/Core/Update/UpdateKernel.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Updater\\\\Module\\:\\:\\$name\\.$#"
-			count: 6
-			path: lib/Drupal/Core/Updater/Module.php
-
 		-
 			message: "#^Method Drupal\\\\Core\\\\Updater\\\\Module\\:\\:postUpdateTasks\\(\\) should return array but return statement is missing\\.$#"
 			count: 1
 			path: lib/Drupal/Core/Updater/Module.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Updater\\\\Theme\\:\\:\\$name\\.$#"
-			count: 2
-			path: lib/Drupal/Core/Updater/Theme.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Updater\\\\Updater\\:\\:\\$name\\.$#"
-			count: 3
-			path: lib/Drupal/Core/Updater/Updater.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Updater\\\\Updater\\:\\:\\$title\\.$#"
-			count: 1
-			path: lib/Drupal/Core/Updater/Updater.php
-
 		-
 			message: "#^Call to an undefined method Drupal\\\\Core\\\\Updater\\\\Updater\\:\\:getInstallDirectory\\(\\)\\.$#"
 			count: 1
@@ -610,11 +415,6 @@ parameters:
 			count: 1
 			path: lib/Drupal/Core/Utility/LinkGenerator.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\Core\\\\Validation\\\\ConstraintValidatorFactory\\:\\:\\$classResolver\\.$#"
-			count: 2
-			path: lib/Drupal/Core/Validation/ConstraintValidatorFactory.php
-
 		-
 			message: "#^Method Drupal\\\\action\\\\Form\\\\ActionFormBase\\:\\:save\\(\\) should return int but return statement is missing\\.$#"
 			count: 1
@@ -655,16 +455,6 @@ parameters:
 			count: 1
 			path: modules/block/src/BlockViewBuilder.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\block\\\\Plugin\\\\migrate\\\\process\\\\BlockTheme\\:\\:\\$themes\\.$#"
-			count: 1
-			path: modules/block/src/Plugin/migrate/process/BlockTheme.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\block_test\\\\Plugin\\\\Block\\\\TestAccessBlock\\:\\:\\$state\\.$#"
-			count: 2
-			path: modules/block/tests/modules/block_test/src/Plugin/Block/TestAccessBlock.php
-
 		-
 			message: "#^Method Drupal\\\\block_content\\\\BlockContentForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#"
 			count: 1
@@ -755,46 +545,6 @@ parameters:
 			count: 1
 			path: modules/comment/src/Plugin/views/field/NodeNewComments.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\comment\\\\Plugin\\\\views\\\\field\\\\StatisticsLastCommentName\\:\\:\\$user_field\\.$#"
-			count: 1
-			path: modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\comment\\\\Plugin\\\\views\\\\field\\\\StatisticsLastCommentName\\:\\:\\$user_table\\.$#"
-			count: 1
-			path: modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\comment\\\\Plugin\\\\views\\\\field\\\\StatisticsLastUpdated\\:\\:\\$node_table\\.$#"
-			count: 1
-			path: modules/comment/src/Plugin/views/field/StatisticsLastUpdated.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\comment\\\\Plugin\\\\views\\\\filter\\\\StatisticsLastUpdated\\:\\:\\$node_table\\.$#"
-			count: 1
-			path: modules/comment/src/Plugin/views/filter/StatisticsLastUpdated.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\comment\\\\Plugin\\\\views\\\\sort\\\\StatisticsLastCommentName\\:\\:\\$user_field\\.$#"
-			count: 1
-			path: modules/comment/src/Plugin/views/sort/StatisticsLastCommentName.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\comment\\\\Plugin\\\\views\\\\sort\\\\StatisticsLastCommentName\\:\\:\\$user_table\\.$#"
-			count: 1
-			path: modules/comment/src/Plugin/views/sort/StatisticsLastCommentName.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\comment\\\\Plugin\\\\views\\\\sort\\\\StatisticsLastUpdated\\:\\:\\$field_alias\\.$#"
-			count: 1
-			path: modules/comment/src/Plugin/views/sort/StatisticsLastUpdated.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\comment\\\\Plugin\\\\views\\\\sort\\\\StatisticsLastUpdated\\:\\:\\$node_table\\.$#"
-			count: 1
-			path: modules/comment/src/Plugin/views/sort/StatisticsLastUpdated.php
-
 		-
 			message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:10\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#"
 			count: 1
@@ -935,11 +685,6 @@ parameters:
 			count: 1
 			path: modules/field_ui/src/Form/FieldStorageConfigEditForm.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\field_ui\\\\Plugin\\\\Derivative\\\\FieldUiLocalAction\\:\\:\\$routeProvider\\.$#"
-			count: 1
-			path: modules/field_ui/src/Plugin/Derivative/FieldUiLocalAction.php
-
 		-
 			message: "#^Method Drupal\\\\file\\\\Plugin\\\\Field\\\\FieldType\\\\FileFieldItemList\\:\\:defaultValuesForm\\(\\) should return array but return statement is missing\\.$#"
 			count: 1
@@ -950,16 +695,6 @@ parameters:
 			count: 1
 			path: modules/file/src/Plugin/Field/FieldType/FileFieldItemList.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\file\\\\Plugin\\\\Field\\\\FieldWidget\\\\FileWidget\\:\\:\\$elementInfo\\.$#"
-			count: 2
-			path: modules/file/src/Plugin/Field/FieldWidget/FileWidget.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\file\\\\Plugin\\\\migrate\\\\process\\\\d6\\\\FieldFile\\:\\:\\$migration\\.$#"
-			count: 1
-			path: modules/file/src/Plugin/migrate/process/d6/FieldFile.php
-
 		-
 			message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:10\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#"
 			count: 2
@@ -995,21 +730,11 @@ parameters:
 			count: 1
 			path: modules/filter/src/FilterProcessResult.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\filter\\\\Plugin\\\\migrate\\\\process\\\\d6\\\\FilterFormatPermission\\:\\:\\$migration\\.$#"
-			count: 1
-			path: modules/filter/src/Plugin/migrate/process/d6/FilterFormatPermission.php
-
 		-
 			message: "#^Method Drupal\\\\forum\\\\ForumManager\\:\\:getTopicOrder\\(\\) should return array but return statement is missing\\.$#"
 			count: 1
 			path: modules/forum/src/ForumManager.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\help_topics\\\\Plugin\\\\HelpSection\\\\HelpTopicSection\\:\\:\\$translationManager\\.$#"
-			count: 3
-			path: modules/help_topics/src/Plugin/HelpSection/HelpTopicSection.php
-
 		-
 			message: "#^Method Drupal\\\\history\\\\Plugin\\\\views\\\\field\\\\HistoryUserTimestamp\\:\\:render\\(\\) should return Drupal\\\\Component\\\\Render\\\\MarkupInterface\\|string but return statement is missing\\.$#"
 			count: 1
@@ -1045,11 +770,6 @@ parameters:
 			count: 1
 			path: modules/jsonapi/src/Revisions/VersionNegotiator.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\RestJsonApiUnsupported\\:\\:\\$httpClient\\.$#"
-			count: 1
-			path: modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php
-
 		-
 			message: "#^Method Drupal\\\\language\\\\Form\\\\LanguageAddForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#"
 			count: 1
@@ -1060,11 +780,6 @@ parameters:
 			count: 1
 			path: modules/language/src/Form/LanguageEditForm.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\language\\\\LanguageNegotiationMethodManager\\:\\:\\$cacheKeyPrefix\\.$#"
-			count: 1
-			path: modules/language/src/LanguageNegotiationMethodManager.php
-
 		-
 			message: "#^Call to an undefined method Drupal\\\\Tests\\\\layout_builder\\\\Unit\\\\DefaultsSectionStorageTest\\:\\:getThirdPartySetting\\(\\)\\.$#"
 			count: 1
@@ -1090,11 +805,6 @@ parameters:
 			count: 1
 			path: modules/locale/src/LocaleDefaultConfigStorage.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\locale\\\\LocaleEvent\\:\\:\\$lids\\.$#"
-			count: 2
-			path: modules/locale/src/LocaleEvent.php
-
 		-
 			message: "#^Method Drupal\\\\locale\\\\LocaleProjectStorage\\:\\:deleteAll\\(\\) should return array but return statement is missing\\.$#"
 			count: 1
@@ -1165,11 +875,6 @@ parameters:
 			count: 1
 			path: modules/migrate/src/Plugin/migrate/destination/Config.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\Entity\\:\\:\\$entityFieldManager\\.$#"
-			count: 1
-			path: modules/migrate/src/Plugin/migrate/destination/Entity.php
-
 		-
 			message: "#^Call to an undefined method Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\destination\\\\Entity\\:\\:processStubRow\\(\\)\\.$#"
 			count: 1
@@ -1190,11 +895,6 @@ parameters:
 			count: 1
 			path: modules/migrate/src/Plugin/migrate/destination/NullDestination.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\migrate\\\\Plugin\\\\migrate\\\\process\\\\Route\\:\\:\\$migration\\.$#"
-			count: 1
-			path: modules/migrate/src/Plugin/migrate/process/Route.php
-
 		-
 			message: "#^Call to an undefined static method static\\(Drupal\\\\Tests\\\\migrate\\\\Kernel\\\\MigrateTestBase\\)\\:\\:migrateDumpAlter\\(\\)\\.$#"
 			count: 1
@@ -1488,11 +1188,6 @@ parameters:
 			count: 1
 			path: modules/system/src/Form/ModulesListNonStableConfirmForm.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\accept_header_routing_test\\\\AcceptHeaderMiddleware\\:\\:\\$app\\.$#"
-			count: 2
-			path: modules/system/tests/modules/accept_header_routing_test/src/AcceptHeaderMiddleware.php
-
 		-
 			message: "#^Class Drupal\\\\advisory_feed_test\\\\AdvisoriesTestHttpClient extends @final class GuzzleHttp\\\\Client\\.$#"
 			count: 1
@@ -1518,21 +1213,6 @@ parameters:
 			count: 1
 			path: modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/ChangedTestItem.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\error_service_test\\\\Controller\\\\LonelyMonkeyController\\:\\:\\$class\\.$#"
-			count: 1
-			path: modules/system/tests/modules/error_service_test/src/Controller/LonelyMonkeyController.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\error_service_test\\\\LonelyMonkeyClass\\:\\:\\$connection\\.$#"
-			count: 1
-			path: modules/system/tests/modules/error_service_test/src/LonelyMonkeyClass.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\error_service_test\\\\MonkeysInTheControlRoom\\:\\:\\$settings\\.$#"
-			count: 2
-			path: modules/system/tests/modules/error_service_test/src/MonkeysInTheControlRoom.php
-
 		-
 			message: "#^Result of function usleep \\(void\\) is used\\.$#"
 			count: 1
@@ -1643,11 +1323,6 @@ parameters:
 			count: 1
 			path: modules/tour/src/TipPluginBase.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\update\\\\UpdateProcessor\\:\\:\\$fetchTasks\\.$#"
-			count: 2
-			path: modules/update/src/UpdateProcessor.php
-
 		-
 			message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:10\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#"
 			count: 4
@@ -1668,11 +1343,6 @@ parameters:
 			count: 1
 			path: modules/user/src/Plugin/views/field/UserData.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\user\\\\Plugin\\\\views\\\\filter\\\\Name\\:\\:\\$validated_exposed_input\\.$#"
-			count: 1
-			path: modules/user/src/Plugin/views/filter/Name.php
-
 		-
 			message: "#^Method Drupal\\\\user\\\\ProfileForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#"
 			count: 1
@@ -1808,21 +1478,11 @@ parameters:
 			count: 2
 			path: modules/views/src/Plugin/views/filter/FilterPluginBase.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\views\\\\Plugin\\\\views\\\\query\\\\QueryPluginBase\\:\\:\\$groupOperator\\.$#"
-			count: 1
-			path: modules/views/src/Plugin/views/query/QueryPluginBase.php
-
 		-
 			message: "#^Undefined variable\\: \\$def$#"
 			count: 2
 			path: modules/views/src/Plugin/views/relationship/EntityReverse.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\views\\\\Plugin\\\\views\\\\sort\\\\GroupByNumeric\\:\\:\\$handler\\.$#"
-			count: 1
-			path: modules/views/src/Plugin/views/sort/GroupByNumeric.php
-
 		-
 			message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:10\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#"
 			count: 1
@@ -1908,16 +1568,6 @@ parameters:
 			count: 1
 			path: modules/views_ui/src/ViewEditForm.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\views_ui\\\\ViewUI\\:\\:\\$ajax\\.$#"
-			count: 1
-			path: modules/views_ui/src/ViewUI.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\views_ui\\\\ViewUI\\:\\:\\$entityType\\.$#"
-			count: 1
-			path: modules/views_ui/src/ViewUI.php
-
 		-
 			message: "#^Method Drupal\\\\views_ui\\\\ViewUI\\:\\:getTypedData\\(\\) should return Drupal\\\\Core\\\\TypedData\\\\ComplexDataInterface but return statement is missing\\.$#"
 			count: 1
@@ -1978,11 +1628,6 @@ parameters:
 			count: 1
 			path: modules/workspaces/src/WorkspacePublisher.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\demo_umami_content\\\\InstallHelper\\:\\:\\$module_path\\.$#"
-			count: 5
-			path: profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php
-
 		-
 			message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:10\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#"
 			count: 12
@@ -2058,36 +1703,6 @@ parameters:
 			count: 1
 			path: tests/Drupal/KernelTests/KernelTestBaseTest.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\KernelTests\\\\RouteProvider\\:\\:\\$service\\.$#"
-			count: 1
-			path: tests/Drupal/KernelTests/RouteProvider.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:\\$baseUrl\\.$#"
-			count: 1
-			path: tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:\\$configImporter\\.$#"
-			count: 1
-			path: tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:\\$defaultTheme\\.$#"
-			count: 2
-			path: tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:\\$originalShutdownCallbacks\\.$#"
-			count: 1
-			path: tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php
-
-		-
-			message: "#^Access to an undefined property Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:\\$translationFilesDirectory\\.$#"
-			count: 1
-			path: tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php
-
 		-
 			message: "#^Call to an undefined method Drupal\\\\TestSite\\\\Commands\\\\TestSiteInstallCommand\\:\\:assertTrue\\(\\)\\.$#"
 			count: 1
@@ -2133,11 +1748,6 @@ parameters:
 			count: 1
 			path: tests/Drupal/Tests/Component/PhpStorage/FileStorageTest.php
 
-		-
-			message: "#^Access to an undefined property Drupal\\\\Tests\\\\Component\\\\PhpStorage\\\\MTimeProtectedFileStorageBase\\:\\:\\$expected\\.$#"
-			count: 3
-			path: tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php
-
 		-
 			message: "#^Cannot unset offset int on array\\<string, mixed\\>\\.$#"
 			count: 1
diff --git a/core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php b/core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php
index f1d17a6cb4..8a26d7ba4e 100644
--- a/core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php
+++ b/core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php
@@ -88,6 +88,11 @@ class InstallHelper implements ContainerInjectionInterface {
    */
   protected $nodeIdMap;
 
+  /**
+   * The module's path.
+   */
+  protected string $module_path;
+
   /**
    * Constructs a new InstallHelper object.
    *
diff --git a/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php b/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php
index d3a262fd01..de0efae6d6 100644
--- a/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php
+++ b/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php
@@ -261,7 +261,7 @@ public function testLoggerException() {
     $this->assertStringContainsString('Failed to log error', $errors[0], 'The error handling logs when an error could not be logged to the logger.');
 
     $expected_path = \Drupal::root() . '/core/modules/system/tests/modules/error_service_test/src/MonkeysInTheControlRoom.php';
-    $expected_line = 62;
+    $expected_line = 67;
     $expected_entry = "Failed to log error: Exception: Deforestation in Drupal\\error_service_test\\MonkeysInTheControlRoom->handle() (line {$expected_line} of {$expected_path})";
     $this->assertStringContainsString($expected_entry, $errors[0], 'Original error logged to the PHP error log when an exception is thrown by a logger');
 
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionsTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionsTest.php
index dcd586c597..30f430f9aa 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionsTest.php
@@ -253,7 +253,7 @@ public function testIsLatestAffectedRevisionTranslation() {
     $it_revision->isDefaultRevision(FALSE);
     // @todo Remove this once the "original" property works with revisions. See
     //   https://www.drupal.org/project/drupal/issues/2859042.
-    $it_revision->original = $storage->loadRevision($it_revision->getLoadedRevisionId());
+    $it_revision->setOriginalDefaultRevision($storage->loadRevision($it_revision->getLoadedRevisionId()));
     $it_revision->save();
     $this->assertTrue($it_revision->isLatestRevision());
     $this->assertTrue($it_revision->isLatestTranslationAffectedRevision());
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeTest.php
new file mode 100644
index 0000000000..6b47489844
--- /dev/null
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeTest.php
@@ -0,0 +1,64 @@
+<?php
+
+namespace Drupal\KernelTests\Core\Entity;
+
+use Drupal\Core\Entity\EntityType;
+use Drupal\Core\StringTranslation\TranslationManager;
+use Drupal\KernelTests\KernelTestBase;
+
+/**
+ * Tests general features of entity types.
+ *
+ * @group Entity
+ */
+class EntityTypeTest extends KernelTestBase {
+
+  /**
+   * Sets up an EntityType object for a given set of values.
+   *
+   * @param array $definition
+   *   An array of values to use for the EntityType.
+   *
+   * @return \Drupal\Core\Entity\EntityTypeInterface
+   */
+  protected function setUpEntityType($definition) {
+    $definition += [
+      'id' => 'example_entity_type',
+    ];
+    return new EntityType($definition);
+  }
+
+  /**
+   * Tests that the EntityType object can be serialized.
+   */
+  public function testIsSerializable() {
+    $entity_type = $this->setUpEntityType([]);
+
+    $translation_service = new class () extends TranslationManager {
+
+      /**
+       * Constructs a UnserializableTranslationManager object.
+       */
+      public function __construct() {
+      }
+
+      /**
+       * @return array
+       */
+      public function __serialize(): array {
+        throw new \Exception();
+      }
+
+    };
+
+    $this->container->set('bar', $translation_service);
+    $entity_type->setStringTranslation($this->container->get('string_translation'));
+
+    // This should not throw an exception.
+    $tmp = serialize($entity_type);
+    $entity_type = unserialize($tmp);
+    // And this should have the correct id.
+    $this->assertEquals('example_entity_type', $entity_type->id());
+  }
+
+}
diff --git a/core/tests/Drupal/KernelTests/RouteProvider.php b/core/tests/Drupal/KernelTests/RouteProvider.php
index f075dbae0d..22864ad1b7 100644
--- a/core/tests/Drupal/KernelTests/RouteProvider.php
+++ b/core/tests/Drupal/KernelTests/RouteProvider.php
@@ -3,6 +3,7 @@
 namespace Drupal\KernelTests;
 
 use Drupal\Core\Routing\PreloadableRouteProviderInterface;
+use Drupal\Core\Routing\RouteProvider as RouteProviderBase;
 use Symfony\Component\HttpFoundation\Request;
 
 /**
@@ -12,6 +13,11 @@ class RouteProvider implements PreloadableRouteProviderInterface {
 
   use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
 
+  /**
+   * The route provider service.
+   */
+  protected RouteProviderBase $service;
+
   /**
    * Loads the real route provider from the container and rebuilds the router.
    *
diff --git a/core/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php b/core/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php
index e9d4349483..cb98a2fadf 100644
--- a/core/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php
+++ b/core/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\TestSite\Commands;
 
+use Drupal\Core\Config\ConfigImporter;
 use Drupal\Core\Database\Database;
 use Drupal\Core\Test\FunctionalTestSetupTrait;
 use Drupal\Core\Test\TestDatabase;
@@ -30,6 +31,35 @@ class TestSiteInstallCommand extends Command {
     changeDatabasePrefix as protected changeDatabasePrefixTrait;
   }
 
+  /**
+   * The theme to install as the default for testing.
+   *
+   * Defaults to the install profile's default theme, if it specifies any.
+   */
+  protected string $defaultTheme;
+
+  /**
+   * The base URL.
+   */
+  protected string $baseUrl;
+
+  /**
+   * The original array of shutdown function callbacks.
+   */
+  protected array $originalShutdownCallbacks = [];
+
+  /**
+   * The translation file directory for the test environment.
+   *
+   * This is set in BrowserTestBase::prepareEnvironment().
+   */
+  protected string $translationFilesDirectory;
+
+  /**
+   * The config importer that can be used in a test.
+   */
+  protected ?ConfigImporter $configImporter;
+
   /**
    * The install profile to use.
    *
@@ -46,13 +76,6 @@ class TestSiteInstallCommand extends Command {
    */
   protected $timeLimit = 500;
 
-  /**
-   * The database prefix of this test run.
-   *
-   * @var string
-   */
-  protected $databasePrefix;
-
   /**
    * The language to install the site in.
    *
diff --git a/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php
index 67ea98619d..75ecb19203 100644
--- a/core/tests/Drupal/Tests/BrowserTestBase.php
+++ b/core/tests/Drupal/Tests/BrowserTestBase.php
@@ -73,13 +73,6 @@ abstract class BrowserTestBase extends TestCase {
   use ExpectDeprecationTrait;
   use ExtensionListTestTrait;
 
-  /**
-   * The database prefix of this test run.
-   *
-   * @var string
-   */
-  protected $databasePrefix;
-
   /**
    * Time limit in seconds for the test.
    *
@@ -201,13 +194,6 @@ abstract class BrowserTestBase extends TestCase {
    */
   protected $originalShutdownCallbacks = [];
 
-  /**
-   * The app root.
-   *
-   * @var string
-   */
-  protected $root;
-
   /**
    * The original container.
    *
diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
index eeb933e0d0..0560901888 100644
--- a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
+++ b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
@@ -30,7 +30,7 @@ class ContainerTest extends TestCase {
   /**
    * The tested container.
    *
-   * @var \Symfony\Component\DependencyInjection\ContainerInterface
+   * @var \Drupal\Component\DependencyInjection\ContainerInterface
    */
   protected $container;
 
@@ -685,6 +685,20 @@ public function testResolveServicesAndParametersForRawArgument() {
     $this->assertEquals(['ccc'], $this->container->get('service_with_raw_argument')->getArguments());
   }
 
+  /**
+   * @covers \Drupal\Component\DependencyInjection\ServiceIdHashTrait::getServiceIdMappings
+   * @covers \Drupal\Component\DependencyInjection\ServiceIdHashTrait::generateServiceIdHash
+   */
+  public function testGetServiceIdMappings() {
+    $this->assertEquals([], $this->container->getServiceIdMappings());
+    $s1 = $this->container->get('other.service');
+    $s2 = $this->container->get('late.service');
+    $this->assertEquals([
+      $this->container->generateServiceIdHash($s1) => 'other.service',
+      $this->container->generateServiceIdHash($s2) => 'late.service',
+    ], $this->container->getServiceIdMappings());
+  }
+
   /**
    * Gets a mock container definition.
    *
diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php
index b0d9a132df..64696d909f 100644
--- a/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php
+++ b/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php
@@ -10,6 +10,7 @@
   use Drupal\Component\Utility\Crypt;
   use Drupal\Tests\PhpUnitCompatibilityTrait;
   use PHPUnit\Framework\TestCase;
+  use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
   use Symfony\Component\DependencyInjection\Definition;
   use Symfony\Component\DependencyInjection\Reference;
   use Symfony\Component\DependencyInjection\Parameter;
@@ -26,6 +27,7 @@
   class OptimizedPhpArrayDumperTest extends TestCase {
 
     use PhpUnitCompatibilityTrait;
+    use ExpectDeprecationTrait;
 
     /**
      * The container builder instance.
@@ -335,16 +337,6 @@ public function getDefinitionsDataProvider() {
         'arguments_expected' => $this->getCollection([$this->getParameterCall('llama_parameter')]),
       ] + $base_service_definition;
 
-      // Test objects that have _serviceId property.
-      $drupal_service = new \stdClass();
-      $drupal_service->_serviceId = 'bar';
-
-      $service_definitions[] = [
-        'arguments' => [$drupal_service],
-        'arguments_count' => 1,
-        'arguments_expected' => $this->getCollection([$this->getServiceCall('bar')]),
-      ] + $base_service_definition;
-
       // Test getMethodCalls.
       $calls = [
         ['method', $this->getCollection([])],
@@ -564,6 +556,7 @@ public function testGetServiceDefinitionForExpression() {
      * Tests that the correct RuntimeException is thrown for dumping an object.
      *
      * @covers ::dumpValue
+     * @group legacy
      */
     public function testGetServiceDefinitionForObject() {
       $service = new \stdClass();
@@ -575,9 +568,41 @@ public function testGetServiceDefinitionForObject() {
 
       $this->containerBuilder->getDefinitions()->willReturn($services);
       $this->expectException(RuntimeException::class);
+      $this->expectDeprecation('_serviceId is deprecated in drupal:9.5.0 and is removed from drupal:10.0.0. Use DrupalKernelInterface::getServiceIdMapping() instead. See https://www.drupal.org/node/3292540');
       $this->dumper->getArray();
     }
 
+    /**
+     * Tests that the correct RuntimeException is thrown for dumping an object.
+     *
+     * @covers ::dumpValue
+     * @group legacy
+     */
+    public function testGetServiceDefinitionForObjectServiceId() {
+      $service = new \stdClass();
+      $service->_serviceId = 'foo';
+
+      $services['foo'] = new Definition('\stdClass');
+      $services['bar'] = new Definition('\stdClass');
+      $services['bar']->addArgument($service);
+      foreach ($services as $s) {
+        $s->setPublic(TRUE);
+      }
+
+      $this->containerBuilder->getDefinitions()->willReturn($services);
+      $this->containerBuilder->getDefinition('foo')->willReturn($services['foo']);
+      $this->containerBuilder->getDefinition('bar')->willReturn($services['bar']);
+      $this->expectDeprecation('_serviceId is deprecated in drupal:9.5.0 and is removed from drupal:10.0.0. Use DrupalKernelInterface::getServiceIdMapping() instead. See https://www.drupal.org/node/3292540');
+      $a = $this->dumper->getArray();
+      $this->assertEquals(
+        $this->serializeDefinition([
+          'class' => '\stdClass',
+          // Legacy code takes care of converting _serviceId into this.
+          'arguments' => $this->getCollection([$this->getServiceCall('foo')]),
+          'arguments_count' => 1,
+        ]), $a['services']['bar']);
+    }
+
     /**
      * Tests that the correct RuntimeException is thrown for dumping a resource.
      *
diff --git a/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php b/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php
index 9050744de0..0d15a59b39 100644
--- a/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php
+++ b/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php
@@ -555,6 +555,7 @@ class TestEventListener {
 
   public $preFooInvoked = FALSE;
   public $postFooInvoked = FALSE;
+  public $name;
 
   /**
    * Listener methods.
diff --git a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFastFileStorageTest.php b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFastFileStorageTest.php
index 577241d472..66ea316fdf 100644
--- a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFastFileStorageTest.php
+++ b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFastFileStorageTest.php
@@ -19,7 +19,7 @@ class MTimeProtectedFastFileStorageTest extends MTimeProtectedFileStorageBase {
    * include the hacked file on the first try but the second test will change
    * the directory mtime and so on the second try the file will not be included.
    */
-  protected $expected = [TRUE, FALSE];
+  protected array $expected = [TRUE, FALSE];
 
   /**
    * The PHP storage class to test.
diff --git a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php
index 166ad9b57f..3170e194be 100644
--- a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php
+++ b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php
@@ -34,6 +34,11 @@ abstract class MTimeProtectedFileStorageBase extends PhpStorageTestBase {
    */
   protected $settings;
 
+  /**
+   * The expected test results for the security test.
+   */
+  protected array $expected;
+
   /**
    * {@inheritdoc}
    */
diff --git a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageTest.php b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageTest.php
index bc88c33459..775a43ff28 100644
--- a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageTest.php
+++ b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageTest.php
@@ -18,7 +18,7 @@ class MTimeProtectedFileStorageTest extends MTimeProtectedFileStorageBase {
    * The default implementation protects against even the filemtime change so
    * both iterations will return FALSE.
    */
-  protected $expected = [FALSE, FALSE];
+  protected array $expected = [FALSE, FALSE];
 
   /**
    * The PHP storage class to test.
diff --git a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ComposerHookTest.php b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ComposerHookTest.php
index 1bc89295b4..9c755941da 100644
--- a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ComposerHookTest.php
+++ b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ComposerHookTest.php
@@ -115,16 +115,6 @@ public function testComposerHooks() {
     $this->assertDirectoryExists($sut);
     $this->assertStringContainsString('Scaffolding files for fixtures/drupal-drupal', $stdout);
     $this->assertScaffoldedFile($sut . '/index.php', FALSE, 'Test version of index.php from drupal/core');
-    $topLevelProjectDir = 'composer-hooks-nothing-allowed-fixture';
-    $sut = $this->fixturesDir . '/' . $topLevelProjectDir;
-    // Run composer install on an empty project.
-    $this->mustExec("composer install --no-ansi", $sut);
-    // Require a project that is not allowed to scaffold and confirm that we
-    // get a warning, and it does not scaffold.
-    $this->executeCommand("composer require --no-ansi --no-interaction fixtures/drupal-assets-fixture:dev-main fixtures/scaffold-override-fixture:dev-main", $sut);
-    $this->assertCommandSuccessful();
-    $this->assertFileDoesNotExist($sut . '/sites/default/default.settings.php');
-    $this->assertErrorOutputContains('See https://getcomposer.org/allow-plugins');
   }
 
   /**
diff --git a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/composer-hooks-nothing-allowed-fixture/assets/robots-default.txt b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/composer-hooks-nothing-allowed-fixture/assets/robots-default.txt
deleted file mode 100644
index a26bf8912f..0000000000
--- a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/composer-hooks-nothing-allowed-fixture/assets/robots-default.txt
+++ /dev/null
@@ -1 +0,0 @@
-# robots.txt fixture scaffolded from "file-mappings" in composer-hooks-fixture composer.json fixture.
diff --git a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/composer-hooks-nothing-allowed-fixture/composer.json.tmpl b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/composer-hooks-nothing-allowed-fixture/composer.json.tmpl
deleted file mode 100644
index 33393c3f59..0000000000
--- a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/composer-hooks-nothing-allowed-fixture/composer.json.tmpl
+++ /dev/null
@@ -1,64 +0,0 @@
-{
-  "name": "fixtures/drupal-drupal",
-  "type": "project",
-  "minimum-stability": "dev",
-  "prefer-stable": true,
-  "repositories": {
-    "packagist.org": false,
-    "composer-scaffold": {
-      "type": "path",
-      "url": "__PROJECT_ROOT__",
-      "options": {
-        "symlink": true
-      }
-    },
-    "drupal-core-fixture": {
-      "type": "path",
-      "url": "../drupal-core-fixture",
-      "options": {
-        "symlink": true
-      }
-    },
-    "drupal-assets-fixture": {
-      "type": "path",
-      "url": "../drupal-assets-fixture",
-      "options": {
-        "symlink": true
-      }
-    },
-    "scaffold-override-fixture": {
-      "type": "path",
-      "url": "../scaffold-override-fixture",
-      "options": {
-        "symlink": true
-      }
-    }
-  },
-  "require": {
-    "drupal/core-composer-scaffold": "*",
-    "fixtures/drupal-core-fixture": "*"
-  },
-  "extra": {
-    "drupal-scaffold": {
-      "locations": {
-        "web-root": "./"
-      },
-      "symlink": __SYMLINK__,
-      "file-mapping": {
-        "[web-root]/.htaccess": false,
-        "[web-root]/robots.txt": "assets/robots-default.txt"
-      }
-    },
-    "installer-paths": {
-      "core": ["type:drupal-core"],
-      "modules/contrib/{$name}": ["type:drupal-module"],
-      "modules/custom/{$name}": ["type:drupal-custom-module"],
-      "profiles/contrib/{$name}": ["type:drupal-profile"],
-      "profiles/custom/{$name}": ["type:drupal-custom-profile"],
-      "themes/contrib/{$name}": ["type:drupal-theme"],
-      "themes/custom/{$name}": ["type:drupal-custom-theme"],
-      "libraries/{$name}": ["type:drupal-library"],
-      "drush/Commands/contrib/{$name}": ["type:drupal-drush"]
-    }
-  }
-}
diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php
index ccdd71975a..9c160facbc 100644
--- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php
@@ -15,6 +15,7 @@
 use Drupal\Core\Extension\ThemeHandlerInterface;
 use Drupal\Core\Language\Language;
 use Drupal\Core\Plugin\DefaultLazyPluginCollection;
+use Drupal\Core\Test\TestKernel;
 use Drupal\Tests\Core\Config\Entity\Fixtures\ConfigEntityBaseWithPluginCollections;
 use Drupal\Tests\Core\Plugin\Fixtures\TestConfigurablePlugin;
 use Drupal\Tests\UnitTestCase;
@@ -357,9 +358,8 @@ public function testSleepWithPluginCollections() {
 
     // Also set up a container with the plugin manager so that we can assert
     // that the plugin manager itself is also not serialized.
-    $container = new ContainerBuilder();
-    $container->set('plugin.manager.foo', $plugin_manager);
-    \Drupal::setContainer($container);
+    $container = TestKernel::setContainerWithKernel();
+    $container->set('plugin.manager.foo', $plugin_manager->reveal());
 
     $entity_values = ['the_plugin_collection_config' => [$instance_id => ['foo' => 'original_value']]];
     $entity = new TestConfigEntityWithPluginCollections($entity_values, $this->entityTypeId);
@@ -648,6 +648,8 @@ class TestConfigEntityWithPluginCollections extends ConfigEntityBaseWithPluginCo
 
   protected $pluginManager;
 
+  protected $the_plugin_collection_config;
+
   public function setPluginManager(PluginManagerInterface $plugin_manager) {
     $this->pluginManager = $plugin_manager;
   }
diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php
index bff672f3a7..7f9394236b 100644
--- a/core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php
+++ b/core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php
@@ -24,16 +24,6 @@ public function testGet() {
     $this->assertInstanceOf(BarClass::class, $result);
   }
 
-  /**
-   * @covers ::set
-   */
-  public function testSet() {
-    $container = new ContainerBuilder();
-    $class = new BarClass();
-    $container->set('bar', $class);
-    $this->assertEquals('bar', $class->_serviceId);
-  }
-
   /**
    * @covers ::set
    */
diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/ContainerTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/ContainerTest.php
index df86cddc0f..2d7bd078b1 100644
--- a/core/tests/Drupal/Tests/Core/DependencyInjection/ContainerTest.php
+++ b/core/tests/Drupal/Tests/Core/DependencyInjection/ContainerTest.php
@@ -4,7 +4,6 @@
 
 use Drupal\Core\DependencyInjection\Container;
 use Drupal\Tests\UnitTestCase;
-use Drupal\Tests\Core\DependencyInjection\Fixture\BarClass;
 
 /**
  * @coversDefaultClass \Drupal\Core\DependencyInjection\Container
@@ -21,15 +20,4 @@ public function testSerialize() {
     serialize($container);
   }
 
-  /**
-   * @covers ::set
-   */
-  public function testSet() {
-    $container = new Container();
-    $class = new BarClass();
-    $container->set('bar', $class);
-    // Ensure that _serviceId is set on the object.
-    $this->assertEquals('bar', $class->_serviceId);
-  }
-
 }
diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/DependencySerializationTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/DependencySerializationTest.php
index 6c2446e8f5..407d9feb5c 100644
--- a/core/tests/Drupal/Tests/Core/DependencyInjection/DependencySerializationTest.php
+++ b/core/tests/Drupal/Tests/Core/DependencyInjection/DependencySerializationTest.php
@@ -7,8 +7,8 @@
 
 namespace Drupal\Tests\Core\DependencyInjection;
 
-use Drupal\Core\DependencyInjection\Container;
 use Drupal\Core\DependencyInjection\DependencySerializationTrait;
+use Drupal\Core\Test\TestKernel;
 use Drupal\Tests\UnitTestCase;
 use Symfony\Component\DependencyInjection\ContainerAwareInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -26,11 +26,9 @@ class DependencySerializationTest extends UnitTestCase {
   public function testSerialization() {
     // Create a pseudo service and dependency injected object.
     $service = new \stdClass();
-    $service->_serviceId = 'test_service';
-    $container = new Container();
+    $container = TestKernel::setContainerWithKernel();
     $container->set('test_service', $service);
-    $container->set('service_container', $container);
-    \Drupal::setContainer($container);
+    $this->assertSame($container, $container->get('service_container'));
 
     $dependencySerialization = new DependencySerializationTestDummy($service);
     $dependencySerialization->setContainer($container);
@@ -51,10 +49,8 @@ public function testSerialization() {
   public function testSerializationWithMissingService() {
     // Create a pseudo service and dependency injected object.
     $service = new \stdClass();
-    $service->_serviceId = 'test_service_not_existing';
-    $container = new Container();
+    $container = TestKernel::setContainerWithKernel();
     $container->set('test_service', $service);
-    $container->set('service_container', $container);
     \Drupal::setContainer($container);
 
     $dependencySerialization = new DependencySerializationTestDummy($service);
diff --git a/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php b/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php
index ac30f40b6f..b94cf7ec05 100644
--- a/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php
+++ b/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php
@@ -3,6 +3,8 @@
 namespace Drupal\Tests\Core\DrupalKernel;
 
 use Drupal\Core\DrupalKernel;
+use Drupal\Core\Test\TestKernel;
+use Drupal\Tests\Core\DependencyInjection\Fixture\BarClass;
 use Drupal\Tests\UnitTestCase;
 use org\bovigo\vfs\vfsStream;
 use Symfony\Component\HttpFoundation\Request;
@@ -136,6 +138,16 @@ public function testFindSitePath() {
     $this->assertEquals('sites/example', DrupalKernel::findSitePath($request, FALSE, $vfs_root->url('drupal_root')));
   }
 
+  /**
+   * @covers ::getServiceIdMapping
+   */
+  public function testGetServiceIdMapping() {
+    $service = new BarClass();
+    $container = TestKernel::setContainerWithKernel();
+    $container->set('bar', $service);
+    $this->assertEquals($container->get('kernel')->getServiceIdMapping()[$container->generateServiceIdHash($service)], 'bar');
+  }
+
 }
 
 /**
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php
index 05d4078ef9..523a40f2ec 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php
@@ -7,7 +7,6 @@
 use Drupal\Core\Entity\EntityType;
 use Drupal\Core\Entity\EntityTypeInterface;
 use Drupal\Core\StringTranslation\TranslatableMarkup;
-use Drupal\Core\StringTranslation\TranslationManager;
 use Drupal\Tests\UnitTestCase;
 
 /**
@@ -501,39 +500,4 @@ public function testEntityClassImplements() {
     $this->assertFalse($entity_type->entityClassImplements(\DateTimeInterface::class));
   }
 
-  /**
-   * Tests that the EntityType object can be serialized.
-   */
-  public function testIsSerializable() {
-    $entity_type = $this->setUpEntityType([]);
-
-    $translation_service = new UnserializableTranslationManager();
-    $translation_service->_serviceId = 'string_translation';
-
-    $entity_type->setStringTranslation($translation_service);
-    $entity_type = unserialize(serialize($entity_type));
-
-    $this->assertEquals('example_entity_type', $entity_type->id());
-  }
-
-}
-
-/**
- * Test class.
- */
-class UnserializableTranslationManager extends TranslationManager {
-
-  /**
-   * Constructs a UnserializableTranslationManager object.
-   */
-  public function __construct() {
-  }
-
-  /**
-   * @return array
-   */
-  public function __serialize(): array {
-    throw new \Exception();
-  }
-
 }
diff --git a/core/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php b/core/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php
index 075cd51d92..927a35e457 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php
@@ -16,11 +16,11 @@
 use Drupal\Component\Plugin\Exception\MissingValueContextException;
 use Drupal\Core\Cache\NullBackend;
 use Drupal\Core\DependencyInjection\ClassResolverInterface;
-use Drupal\Core\DependencyInjection\ContainerBuilder;
 use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\Core\Plugin\Context\ContextDefinition;
 use Drupal\Core\Plugin\Context\ContextHandler;
 use Drupal\Core\Plugin\ContextAwarePluginInterface;
+use Drupal\Core\Test\TestKernel;
 use Drupal\Core\TypedData\TypedDataManager;
 use Drupal\Core\Validation\ConstraintManager;
 use Drupal\Tests\UnitTestCase;
@@ -63,7 +63,7 @@ protected function setUp(): void {
       new ConstraintManager($namespaces, $cache_backend, $module_handler->reveal())
     );
 
-    $container = new ContainerBuilder();
+    $container = TestKernel::setContainerWithKernel();
     $container->set('typed_data_manager', $type_data_manager);
     \Drupal::setContainer($container);
   }
@@ -188,7 +188,8 @@ public function providerTestGetMatchingContexts() {
   public function testFilterPluginDefinitionsByContexts($has_context, $definitions, $expected) {
     if ($has_context) {
       $context = $this->createMock('Drupal\Core\Plugin\Context\ContextInterface');
-      $expected_context_definition = (new ContextDefinition('string'))->setConstraints(['Blank' => []]);
+      $expected_context_definition = new ContextDefinition('string');
+      $expected_context_definition->setConstraints(['Blank' => []]);
       $context->expects($this->atLeastOnce())
         ->method('getContextDefinition')
         ->will($this->returnValue($expected_context_definition));
diff --git a/core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php b/core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php
index e65c644afb..6aa7001821 100644
--- a/core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php
+++ b/core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php
@@ -4,10 +4,10 @@
 
 use Drupal\Core\Session\AccountProxyInterface;
 use Drupal\Core\TempStore\Lock;
+use Drupal\Core\Test\TestKernel;
 use Drupal\Tests\UnitTestCase;
 use Drupal\Core\TempStore\SharedTempStore;
 use Drupal\Core\TempStore\TempStoreException;
-use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\RequestStack;
 use Symfony\Component\HttpFoundation\Session\SessionInterface;
@@ -357,12 +357,10 @@ public function testSerialization() {
     $unserializable_request = new UnserializableRequest();
 
     $this->requestStack->push($unserializable_request);
-    $this->requestStack->_serviceId = 'request_stack';
 
-    $container = $this->prophesize(ContainerInterface::class);
-    $container->get('request_stack')->willReturn($this->requestStack);
-    $container->has('request_stack')->willReturn(TRUE);
-    \Drupal::setContainer($container->reveal());
+    $container = TestKernel::setContainerWithKernel();
+    $container->set('request_stack', $this->requestStack);
+    \Drupal::setContainer($container);
 
     $store = unserialize(serialize($this->tempStore));
     $this->assertInstanceOf(SharedTempStore::class, $store);
diff --git a/core/tests/Drupal/Tests/Core/Test/TestSetupTraitTest.php b/core/tests/Drupal/Tests/Core/Test/TestSetupTraitTest.php
index 7b88af7451..43dce9fdcc 100644
--- a/core/tests/Drupal/Tests/Core/Test/TestSetupTraitTest.php
+++ b/core/tests/Drupal/Tests/Core/Test/TestSetupTraitTest.php
@@ -35,8 +35,10 @@ public function testChangeDatabasePrefix() {
     // Create a mock for testing the trait and set a few properties that are
     // used to avoid unnecessary set up.
     $test_setup = $this->getMockForTrait(TestSetupTrait::class);
-    $test_setup->databasePrefix = 'testDbPrefix';
-    $test_setup->root = $root;
+
+    $reflection = new \ReflectionClass($test_setup);
+    $reflection->getProperty('databasePrefix')->setValue($test_setup, 'testDbPrefix');
+    $reflection->getProperty('root')->setValue($test_setup, $root);
 
     $method = new \ReflectionMethod(get_class($test_setup), 'changeDatabasePrefix');
     $method->setAccessible(TRUE);
