From 46d78c772102b4085cd8bc004b33d3023409bc55 Mon Sep 17 00:00:00 2001
From: Stefan Froemken <froemken@gmail.com>
Date: Fri, 17 Mar 2023 14:32:21 +0100
Subject: [PATCH] [BUFGIX] Instanciate individual objects of StandaloneView
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

If StandaloneView was instanciated as constructor argument
you will now get a non shared object.

Resolves: #99172
Releases: main
Change-Id: I8dc72774eedfb7fd2b24e0106bb8e1ec8ecf2807
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78149
Tested-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: Nikita Hovratov <nikita.h@live.de>
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Nikita Hovratov <nikita.h@live.de>
---
 typo3/sysext/fluid/Configuration/Services.yaml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/typo3/sysext/fluid/Configuration/Services.yaml b/typo3/sysext/fluid/Configuration/Services.yaml
index dd4774eca678..4d6a5f44b9c4 100644
--- a/typo3/sysext/fluid/Configuration/Services.yaml
+++ b/typo3/sysext/fluid/Configuration/Services.yaml
@@ -11,8 +11,13 @@ services:
     # (e.g. because factories are to be used instead)
     exclude: '../Classes/{Core/Rendering/RenderingContext.php}'
 
-  # Templateview has $context = null, symfony auto-injects in that case,
+  # TemplateView and StandaloneView have $context = null, symfony auto-injects in that case,
   # extbase did not, force passing `null`
+  TYPO3\CMS\Fluid\View\StandaloneView:
+    public: true
+    shared: false
+    arguments:
+      $context: null
   TYPO3\CMS\Fluid\View\TemplateView:
     public: true
     shared: false
-- 
GitLab