Review main Merged Breaking

75779[!!!][TASK] Avoid Extbase Request init in StandaloneView

Christian Kuhn CR +2 V +2 Normal +120 −20 updated 09/29/22, 20:48

Commit message

The StandaloneView has a very unfortunate flaw in
__construct(): It creates an Extbase Request by
default without asking and adds it to RenderingContext.

The patch removes this default initialization.

StandaloneView is typically *not* used within Extbase
context: Extbase by default uses TemplateView.

As such, creating an Extbase Request in StandaloneView
by default is bad, since it switches context to Extbase
when it shouldn't. This can make ViewHelpers behave differently
and in general adds trouble and cross dependencies.

As a side effect, some ViewHelpers will now actively refuse
to work in non-extabse context and throw exceptions. Most
notably, f:form and f:form.* throw exceptions when used
in a FLUIDTEMPLATE content object. We *might* be able to
relax this during further v12 development, though.

It is possible we later add a factory to the Fluid views
in general that takes care of setting a request to the view.
This however needs some streamlining in Fluid standalone
library first and requires some further decisions.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 4