diff --git a/Command/AssetsInstallCommand.php b/Command/AssetsInstallCommand.php
index c7a5fd7a6..870e686de 100644
--- a/Command/AssetsInstallCommand.php
+++ b/Command/AssetsInstallCommand.php
@@ -96,8 +96,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
     {
         /** @var KernelInterface $kernel */
         $kernel = $this->getApplication()->getKernel();
-        $targetArg = rtrim($input->getArgument('target'), '/');
-
+        $targetArg = rtrim($input->getArgument('target') ?? '', '/');
         if (!$targetArg) {
             $targetArg = $this->getPublicDirectory($kernel->getContainer());
         }
diff --git a/Command/WorkflowDumpCommand.php b/Command/WorkflowDumpCommand.php
index 090435bc4..89d29b981 100644
--- a/Command/WorkflowDumpCommand.php
+++ b/Command/WorkflowDumpCommand.php
@@ -36,7 +36,8 @@ class WorkflowDumpCommand extends Command
     protected static $defaultName = 'workflow:dump';
     protected static $defaultDescription = 'Dump a workflow';
     /**
-     * string is the service id
+     * string is the service id.
+     *
      * @var array<string, Definition>
      */
     private $workflows = [];
diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php
index 519803f15..7664455ff 100644
--- a/DependencyInjection/Configuration.php
+++ b/DependencyInjection/Configuration.php
@@ -1084,13 +1084,14 @@ private function addCacheSection(ArrayNodeDefinition $rootNode, callable $willBe
                             ->prototype('array')
                                 ->fixXmlConfig('adapter')
                                 ->beforeNormalization()
-                                    ->ifTrue(function ($v) { return (isset($v['adapters']) || \is_array($v['adapter'] ?? null)) && isset($v['provider']); })
-                                    ->thenInvalid('Pool cannot have a "provider" while "adapter" is set to a map')
+                                    ->ifTrue(function ($v) { return isset($v['provider']) && \is_array($v['adapters'] ?? $v['adapter'] ?? null) && 1 < \count($v['adapters'] ?? $v['adapter']); })
+                                    ->thenInvalid('Pool cannot have a "provider" while more than one adapter is defined')
                                 ->end()
                                 ->children()
                                     ->arrayNode('adapters')
                                         ->performNoDeepMerging()
                                         ->info('One or more adapters to chain for creating the pool, defaults to "cache.app".')
+                                        ->beforeNormalization()->castToArray()->end()
                                         ->beforeNormalization()
                                             ->always()->then(function ($values) {
                                                 if ([0] === array_keys($values) && \is_array($values[0])) {
diff --git a/DependencyInjection/FrameworkExtension.php b/DependencyInjection/FrameworkExtension.php
index 3c46bc460..67dba44db 100644
--- a/DependencyInjection/FrameworkExtension.php
+++ b/DependencyInjection/FrameworkExtension.php
@@ -341,6 +341,83 @@ public function load(array $configs, ContainerBuilder $container)
             }
         }
 
+        if ($this->isConfigEnabled($container, $config['request'])) {
+            $this->registerRequestConfiguration($config['request'], $container, $loader);
+        }
+
+        if ($this->isConfigEnabled($container, $config['assets'])) {
+            if (!class_exists(\Symfony\Component\Asset\Package::class)) {
+                throw new LogicException('Asset support cannot be enabled as the Asset component is not installed. Try running "composer require symfony/asset".');
+            }
+
+            $this->registerAssetsConfiguration($config['assets'], $container, $loader);
+        }
+
+        if ($this->httpClientConfigEnabled = $this->isConfigEnabled($container, $config['http_client'])) {
+            $this->registerHttpClientConfiguration($config['http_client'], $container, $loader, $config['profiler']);
+        }
+
+        if ($this->mailerConfigEnabled = $this->isConfigEnabled($container, $config['mailer'])) {
+            $this->registerMailerConfiguration($config['mailer'], $container, $loader);
+        }
+
+        $propertyInfoEnabled = $this->isConfigEnabled($container, $config['property_info']);
+        $this->registerHttpCacheConfiguration($config['http_cache'], $container, $config['http_method_override']);
+        $this->registerEsiConfiguration($config['esi'], $container, $loader);
+        $this->registerSsiConfiguration($config['ssi'], $container, $loader);
+        $this->registerFragmentsConfiguration($config['fragments'], $container, $loader);
+        $this->registerTranslatorConfiguration($config['translator'], $container, $loader, $config['default_locale'], $config['enabled_locales']);
+        $this->registerWorkflowConfiguration($config['workflows'], $container, $loader);
+        $this->registerDebugConfiguration($config['php_errors'], $container, $loader);
+        // @deprecated since Symfony 5.4, in 6.0 change to:
+        // $this->registerRouterConfiguration($config['router'], $container, $loader, $config['enabled_locales']);
+        $this->registerRouterConfiguration($config['router'], $container, $loader, $config['translator']['enabled_locales'] ?: $config['enabled_locales']);
+        $this->registerAnnotationsConfiguration($config['annotations'], $container, $loader);
+        $this->registerPropertyAccessConfiguration($config['property_access'], $container, $loader);
+        $this->registerSecretsConfiguration($config['secrets'], $container, $loader);
+
+        $container->getDefinition('exception_listener')->replaceArgument(3, $config['exceptions']);
+
+        if ($this->isConfigEnabled($container, $config['serializer'])) {
+            if (!class_exists(\Symfony\Component\Serializer\Serializer::class)) {
+                throw new LogicException('Serializer support cannot be enabled as the Serializer component is not installed. Try running "composer require symfony/serializer-pack".');
+            }
+
+            $this->registerSerializerConfiguration($config['serializer'], $container, $loader);
+        }
+
+        if ($propertyInfoEnabled) {
+            $this->registerPropertyInfoConfiguration($container, $loader);
+        }
+
+        if (self::$lockConfigEnabled = $this->isConfigEnabled($container, $config['lock'])) {
+            $this->registerLockConfiguration($config['lock'], $container, $loader);
+        }
+
+        if ($this->isConfigEnabled($container, $config['rate_limiter'])) {
+            if (!interface_exists(LimiterInterface::class)) {
+                throw new LogicException('Rate limiter support cannot be enabled as the RateLimiter component is not installed. Try running "composer require symfony/rate-limiter".');
+            }
+
+            $this->registerRateLimiterConfiguration($config['rate_limiter'], $container, $loader);
+        }
+
+        if ($this->isConfigEnabled($container, $config['web_link'])) {
+            if (!class_exists(HttpHeaderSerializer::class)) {
+                throw new LogicException('WebLink support cannot be enabled as the WebLink component is not installed. Try running "composer require symfony/weblink".');
+            }
+
+            $loader->load('web_link.php');
+        }
+
+        if ($this->isConfigEnabled($container, $config['uid'])) {
+            if (!class_exists(UuidFactory::class)) {
+                throw new LogicException('Uid support cannot be enabled as the Uid component is not installed. Try running "composer require symfony/uid".');
+            }
+
+            $this->registerUidConfiguration($config['uid'], $container, $loader);
+        }
+
         // register cache before session so both can share the connection services
         $this->registerCacheConfiguration($config['cache'], $container);
 
@@ -360,15 +437,13 @@ public function load(array $configs, ContainerBuilder $container)
             $container->removeDefinition('test.session.listener');
         }
 
-        if ($this->isConfigEnabled($container, $config['request'])) {
-            $this->registerRequestConfiguration($config['request'], $container, $loader);
-        }
-
+        // csrf depends on session being registered
         if (null === $config['csrf_protection']['enabled']) {
             $config['csrf_protection']['enabled'] = $this->sessionConfigEnabled && !class_exists(FullStack::class) && ContainerBuilder::willBeAvailable('symfony/security-csrf', CsrfTokenManagerInterface::class, ['symfony/framework-bundle'], true);
         }
         $this->registerSecurityCsrfConfiguration($config['csrf_protection'], $container, $loader);
 
+        // form depends on csrf being registered
         if ($this->isConfigEnabled($container, $config['form'])) {
             if (!class_exists(Form::class)) {
                 throw new LogicException('Form support cannot be enabled as the Form component is not installed. Try running "composer require symfony/form".');
@@ -389,14 +464,10 @@ public function load(array $configs, ContainerBuilder $container)
             $container->removeDefinition('console.command.form_debug');
         }
 
-        if ($this->isConfigEnabled($container, $config['assets'])) {
-            if (!class_exists(\Symfony\Component\Asset\Package::class)) {
-                throw new LogicException('Asset support cannot be enabled as the Asset component is not installed. Try running "composer require symfony/asset".');
-            }
-
-            $this->registerAssetsConfiguration($config['assets'], $container, $loader);
-        }
+        // validation depends on form, annotations being registered
+        $this->registerValidationConfiguration($config['validation'], $container, $loader, $propertyInfoEnabled);
 
+        // messenger depends on validation being registered
         if ($this->messengerConfigEnabled = $this->isConfigEnabled($container, $config['messenger'])) {
             $this->registerMessengerConfiguration($config['messenger'], $container, $loader, $config['validation']);
         } else {
@@ -430,76 +501,13 @@ public function load(array $configs, ContainerBuilder $container)
             }
         }
 
-        if ($this->httpClientConfigEnabled = $this->isConfigEnabled($container, $config['http_client'])) {
-            $this->registerHttpClientConfiguration($config['http_client'], $container, $loader, $config['profiler']);
-        }
-
-        if ($this->mailerConfigEnabled = $this->isConfigEnabled($container, $config['mailer'])) {
-            $this->registerMailerConfiguration($config['mailer'], $container, $loader);
-        }
-
+        // notifier depends on messenger, mailer being registered
         if ($this->notifierConfigEnabled = $this->isConfigEnabled($container, $config['notifier'])) {
             $this->registerNotifierConfiguration($config['notifier'], $container, $loader);
         }
 
-        $propertyInfoEnabled = $this->isConfigEnabled($container, $config['property_info']);
-        $this->registerValidationConfiguration($config['validation'], $container, $loader, $propertyInfoEnabled);
-        $this->registerHttpCacheConfiguration($config['http_cache'], $container, $config['http_method_override']);
-        $this->registerEsiConfiguration($config['esi'], $container, $loader);
-        $this->registerSsiConfiguration($config['ssi'], $container, $loader);
-        $this->registerFragmentsConfiguration($config['fragments'], $container, $loader);
-        $this->registerTranslatorConfiguration($config['translator'], $container, $loader, $config['default_locale'], $config['enabled_locales']);
+        // profiler depends on form, validation, translation, messenger, mailer, http-client, notifier being registered
         $this->registerProfilerConfiguration($config['profiler'], $container, $loader);
-        $this->registerWorkflowConfiguration($config['workflows'], $container, $loader);
-        $this->registerDebugConfiguration($config['php_errors'], $container, $loader);
-        // @deprecated since Symfony 5.4, in 6.0 change to:
-        // $this->registerRouterConfiguration($config['router'], $container, $loader, $config['enabled_locales']);
-        $this->registerRouterConfiguration($config['router'], $container, $loader, $config['translator']['enabled_locales'] ?: $config['enabled_locales']);
-        $this->registerAnnotationsConfiguration($config['annotations'], $container, $loader);
-        $this->registerPropertyAccessConfiguration($config['property_access'], $container, $loader);
-        $this->registerSecretsConfiguration($config['secrets'], $container, $loader);
-
-        $container->getDefinition('exception_listener')->replaceArgument(3, $config['exceptions']);
-
-        if ($this->isConfigEnabled($container, $config['serializer'])) {
-            if (!class_exists(\Symfony\Component\Serializer\Serializer::class)) {
-                throw new LogicException('Serializer support cannot be enabled as the Serializer component is not installed. Try running "composer require symfony/serializer-pack".');
-            }
-
-            $this->registerSerializerConfiguration($config['serializer'], $container, $loader);
-        }
-
-        if ($propertyInfoEnabled) {
-            $this->registerPropertyInfoConfiguration($container, $loader);
-        }
-
-        if (self::$lockConfigEnabled = $this->isConfigEnabled($container, $config['lock'])) {
-            $this->registerLockConfiguration($config['lock'], $container, $loader);
-        }
-
-        if ($this->isConfigEnabled($container, $config['rate_limiter'])) {
-            if (!interface_exists(LimiterInterface::class)) {
-                throw new LogicException('Rate limiter support cannot be enabled as the RateLimiter component is not installed. Try running "composer require symfony/rate-limiter".');
-            }
-
-            $this->registerRateLimiterConfiguration($config['rate_limiter'], $container, $loader);
-        }
-
-        if ($this->isConfigEnabled($container, $config['web_link'])) {
-            if (!class_exists(HttpHeaderSerializer::class)) {
-                throw new LogicException('WebLink support cannot be enabled as the WebLink component is not installed. Try running "composer require symfony/weblink".');
-            }
-
-            $loader->load('web_link.php');
-        }
-
-        if ($this->isConfigEnabled($container, $config['uid'])) {
-            if (!class_exists(UuidFactory::class)) {
-                throw new LogicException('Uid support cannot be enabled as the Uid component is not installed. Try running "composer require symfony/uid".');
-            }
-
-            $this->registerUidConfiguration($config['uid'], $container, $loader);
-        }
 
         $this->addAnnotatedClassesToCompile([
             '**\\Controller\\',
@@ -2229,7 +2237,9 @@ private function registerCacheConfiguration(array $config, ContainerBuilder $con
                 $pool['reset'] = 'reset';
             }
 
-            if ($isRedisTagAware) {
+            if ($isRedisTagAware && 'cache.app' === $name) {
+                $container->setAlias('cache.app.taggable', $name);
+            } elseif ($isRedisTagAware) {
                 $tagAwareId = $name;
                 $container->setAlias('.'.$name.'.inner', $name);
             } elseif ($pool['tags']) {
diff --git a/KernelBrowser.php b/KernelBrowser.php
index 8c32625b1..64adcdd44 100644
--- a/KernelBrowser.php
+++ b/KernelBrowser.php
@@ -144,8 +144,13 @@ public function loginUser(object $user, string $firewallContext = 'main'): self
         $session->set('_security_'.$firewallContext, serialize($token));
         $session->save();
 
-        $cookie = new Cookie($session->getName(), $session->getId());
-        $this->getCookieJar()->set($cookie);
+        $domains = array_unique(array_map(function (Cookie $cookie) use ($session) {
+            return $cookie->getName() === $session->getName() ? $cookie->getDomain() : '';
+        }, $this->getCookieJar()->all())) ?: [''];
+        foreach ($domains as $domain) {
+            $cookie = new Cookie($session->getName(), $session->getId(), null, null, $domain);
+            $this->getCookieJar()->set($cookie);
+        }
 
         return $this;
     }
diff --git a/LICENSE b/LICENSE
index 9ff2d0d63..88bf75bb4 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2004-2021 Fabien Potencier
+Copyright (c) 2004-2022 Fabien Potencier
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
diff --git a/Resources/config/mailer_debug.php b/Resources/config/mailer_debug.php
index 3fb6ce0a4..cdb205750 100644
--- a/Resources/config/mailer_debug.php
+++ b/Resources/config/mailer_debug.php
@@ -12,7 +12,6 @@
 namespace Symfony\Component\DependencyInjection\Loader\Configurator;
 
 use Symfony\Component\Mailer\DataCollector\MessageDataCollector;
-use Symfony\Component\Mailer\EventListener\MessageLoggerListener;
 
 return static function (ContainerConfigurator $container) {
     $container->services()
diff --git a/Resources/config/notifier_transports.php b/Resources/config/notifier_transports.php
index 8e3bb4ce2..c07028847 100644
--- a/Resources/config/notifier_transports.php
+++ b/Resources/config/notifier_transports.php
@@ -272,6 +272,6 @@
 
         ->set('notifier.transport_factory.expo', ExpoTransportFactory::class)
             ->parent('notifier.transport_factory.abstract')
-            ->tag('chatter.transport_factory')
+            ->tag('texter.transport_factory')
     ;
 };
diff --git a/Resources/config/serializer.php b/Resources/config/serializer.php
index dfb2589cb..cb7d79dfb 100644
--- a/Resources/config/serializer.php
+++ b/Resources/config/serializer.php
@@ -99,6 +99,7 @@
             ->tag('serializer.normalizer', ['priority' => -910])
 
         ->set('serializer.normalizer.json_serializable', JsonSerializableNormalizer::class)
+            ->args([null, null])
             ->tag('serializer.normalizer', ['priority' => -900])
 
         ->set('serializer.normalizer.problem', ProblemNormalizer::class)
@@ -178,6 +179,7 @@
             ->tag('serializer.encoder')
 
         ->set('serializer.encoder.yaml', YamlEncoder::class)
+            ->args([null, null])
             ->tag('serializer.encoder')
 
         ->set('serializer.encoder.csv', CsvEncoder::class)
diff --git a/Tests/DependencyInjection/Fixtures/php/cache_app_redis_tag_aware.php b/Tests/DependencyInjection/Fixtures/php/cache_app_redis_tag_aware.php
new file mode 100644
index 000000000..44855c62a
--- /dev/null
+++ b/Tests/DependencyInjection/Fixtures/php/cache_app_redis_tag_aware.php
@@ -0,0 +1,7 @@
+<?php
+
+$container->loadFromExtension('framework', [
+    'cache' => [
+        'app' => 'cache.adapter.redis_tag_aware',
+    ],
+]);
diff --git a/Tests/DependencyInjection/Fixtures/php/cache_app_redis_tag_aware_pool.php b/Tests/DependencyInjection/Fixtures/php/cache_app_redis_tag_aware_pool.php
new file mode 100644
index 000000000..bf3ee2de2
--- /dev/null
+++ b/Tests/DependencyInjection/Fixtures/php/cache_app_redis_tag_aware_pool.php
@@ -0,0 +1,12 @@
+<?php
+
+$container->loadFromExtension('framework', [
+    'cache' => [
+        'app' => 'cache.redis_tag_aware.foo',
+        'pools' => [
+            'cache.redis_tag_aware.foo' => [
+                'adapter' => 'cache.adapter.redis_tag_aware',
+            ],
+        ],
+    ],
+]);
diff --git a/Tests/DependencyInjection/Fixtures/php/form_default_csrf.php b/Tests/DependencyInjection/Fixtures/php/form_default_csrf.php
new file mode 100644
index 000000000..a57d52338
--- /dev/null
+++ b/Tests/DependencyInjection/Fixtures/php/form_default_csrf.php
@@ -0,0 +1,11 @@
+<?php
+
+$container->loadFromExtension('framework', [
+    'form' => [
+        'legacy_error_messages' => false,
+    ],
+    'session' => [
+        'storage_factory_id' => 'session.storage.factory.native',
+        'handler_id' => null,
+    ],
+]);
diff --git a/Tests/DependencyInjection/Fixtures/xml/cache_app_redis_tag_aware.xml b/Tests/DependencyInjection/Fixtures/xml/cache_app_redis_tag_aware.xml
new file mode 100644
index 000000000..2929e87e2
--- /dev/null
+++ b/Tests/DependencyInjection/Fixtures/xml/cache_app_redis_tag_aware.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" ?>
+<container xmlns="http://symfony.com/schema/dic/services"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:framework="http://symfony.com/schema/dic/symfony"
+    xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd
+        http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
+
+    <framework:config>
+        <framework:cache>
+            <framework:app>cache.adapter.redis_tag_aware</framework:app>
+        </framework:cache>
+    </framework:config>
+</container>
diff --git a/Tests/DependencyInjection/Fixtures/xml/cache_app_redis_tag_aware_pool.xml b/Tests/DependencyInjection/Fixtures/xml/cache_app_redis_tag_aware_pool.xml
new file mode 100644
index 000000000..65c06a1da
--- /dev/null
+++ b/Tests/DependencyInjection/Fixtures/xml/cache_app_redis_tag_aware_pool.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" ?>
+<container xmlns="http://symfony.com/schema/dic/services"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:framework="http://symfony.com/schema/dic/symfony"
+    xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd
+        http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
+
+    <framework:config>
+        <framework:cache>
+            <framework:app>cache.redis_tag_aware.foo</framework:app>
+            <framework:pool name="cache.redis_tag_aware.foo" adapter="cache.adapter.redis_tag_aware" />
+        </framework:cache>
+    </framework:config>
+</container>
diff --git a/Tests/DependencyInjection/Fixtures/xml/form_default_csrf.xml b/Tests/DependencyInjection/Fixtures/xml/form_default_csrf.xml
new file mode 100644
index 000000000..9ed400847
--- /dev/null
+++ b/Tests/DependencyInjection/Fixtures/xml/form_default_csrf.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" ?>
+
+<container xmlns="http://symfony.com/schema/dic/services"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:framework="http://symfony.com/schema/dic/symfony"
+    xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd
+                        http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
+
+    <framework:config>
+        <framework:form enabled="true" legacy-error-messages="false" />
+        <framework:session storage-factory-id="session.storage.factory.native" handler-id="null"/>
+    </framework:config>
+</container>
diff --git a/Tests/DependencyInjection/Fixtures/yml/cache_app_redis_tag_aware.yml b/Tests/DependencyInjection/Fixtures/yml/cache_app_redis_tag_aware.yml
new file mode 100644
index 000000000..b1c89adaf
--- /dev/null
+++ b/Tests/DependencyInjection/Fixtures/yml/cache_app_redis_tag_aware.yml
@@ -0,0 +1,3 @@
+framework:
+    cache:
+        app: cache.adapter.redis_tag_aware
diff --git a/Tests/DependencyInjection/Fixtures/yml/cache_app_redis_tag_aware_pool.yml b/Tests/DependencyInjection/Fixtures/yml/cache_app_redis_tag_aware_pool.yml
new file mode 100644
index 000000000..9eb8b83c7
--- /dev/null
+++ b/Tests/DependencyInjection/Fixtures/yml/cache_app_redis_tag_aware_pool.yml
@@ -0,0 +1,6 @@
+framework:
+    cache:
+        app: cache.redis_tag_aware.foo
+        pools:
+            cache.redis_tag_aware.foo:
+                adapter: cache.adapter.redis_tag_aware
diff --git a/Tests/DependencyInjection/Fixtures/yml/form_default_csrf.yml b/Tests/DependencyInjection/Fixtures/yml/form_default_csrf.yml
new file mode 100644
index 000000000..5036cc857
--- /dev/null
+++ b/Tests/DependencyInjection/Fixtures/yml/form_default_csrf.yml
@@ -0,0 +1,6 @@
+framework:
+    form:
+        legacy_error_messages: false
+    session:
+        storage_factory_id: session.storage.factory.native
+        handler_id: null
diff --git a/Tests/DependencyInjection/FrameworkExtensionTest.php b/Tests/DependencyInjection/FrameworkExtensionTest.php
index 82796dfd7..0d9656ff2 100644
--- a/Tests/DependencyInjection/FrameworkExtensionTest.php
+++ b/Tests/DependencyInjection/FrameworkExtensionTest.php
@@ -158,6 +158,18 @@ public function testCsrfProtectionForFormsEnablesCsrfProtectionAutomatically()
         $this->assertTrue($container->hasDefinition('security.csrf.token_manager'));
     }
 
+    public function testFormsCsrfIsEnabledByDefault()
+    {
+        if (class_exists(FullStack::class)) {
+            $this->markTestSkipped('testing with the FullStack prevents verifying default values');
+        }
+        $container = $this->createContainerFromFile('form_default_csrf');
+
+        $this->assertTrue($container->hasDefinition('security.csrf.token_manager'));
+        $this->assertTrue($container->hasParameter('form.type_extension.csrf.enabled'));
+        $this->assertTrue($container->getParameter('form.type_extension.csrf.enabled'));
+    }
+
     public function testHttpMethodOverride()
     {
         $container = $this->createContainerFromFile('full');
@@ -1688,6 +1700,32 @@ public function testRedisTagAwareAdapter()
         }
     }
 
+    /**
+     * @dataProvider appRedisTagAwareConfigProvider
+     */
+    public function testAppRedisTagAwareAdapter(string $configFile)
+    {
+        $container = $this->createContainerFromFile($configFile);
+
+        foreach ([TagAwareCacheInterface::class, CacheInterface::class, CacheItemPoolInterface::class] as $alias) {
+            $def = $container->findDefinition($alias);
+
+            while ($def instanceof ChildDefinition) {
+                $def = $container->getDefinition($def->getParent());
+            }
+
+            $this->assertSame(RedisTagAwareAdapter::class, $def->getClass());
+        }
+    }
+
+    public function appRedisTagAwareConfigProvider(): array
+    {
+        return [
+            ['cache_app_redis_tag_aware'],
+            ['cache_app_redis_tag_aware_pool'],
+        ];
+    }
+
     public function testRemovesResourceCheckerConfigCacheFactoryArgumentOnlyIfNoDebug()
     {
         $container = $this->createContainer(['kernel.debug' => true]);
diff --git a/Tests/Functional/SecurityTest.php b/Tests/Functional/SecurityTest.php
index a53513bae..d97039562 100644
--- a/Tests/Functional/SecurityTest.php
+++ b/Tests/Functional/SecurityTest.php
@@ -70,4 +70,20 @@ public function testLoginInBetweenRequests()
         $client->request('GET', '/main/user_profile');
         $this->assertEquals('Welcome the-username!', $client->getResponse()->getContent());
     }
+
+    public function testLoginUserMultipleTimes()
+    {
+        $userFoo = new InMemoryUser('the-username', 'the-password', ['ROLE_FOO']);
+        $userBar = new InMemoryUser('no-role-username', 'the-password');
+        $client = $this->createClient(['test_case' => 'Security', 'root_config' => 'config.yml']);
+        $client->loginUser($userFoo);
+
+        $client->request('GET', '/main/user_profile');
+        $this->assertEquals('Welcome the-username!', $client->getResponse()->getContent());
+
+        $client->loginUser($userBar);
+
+        $client->request('GET', '/main/user_profile');
+        $this->assertEquals('Welcome no-role-username!', $client->getResponse()->getContent());
+    }
 }
diff --git a/Tests/Functional/app/Serializer/config.yml b/Tests/Functional/app/Serializer/config.yml
index 7878c2ecb..3721de1ca 100644
--- a/Tests/Functional/app/Serializer/config.yml
+++ b/Tests/Functional/app/Serializer/config.yml
@@ -2,7 +2,10 @@ imports:
     - { resource: ../config/default.yml }
 
 framework:
-    serializer: { enabled: true }
+    serializer:
+        enabled: true
+        default_context:
+            enable_max_depth: true
     property_info: { enabled: true }
 
 services:
