Review main Merged

85708[TASK] Use fluid attribute for Request handling

Christian Kuhn CR +2 V +2 Hard +458 −528 updated 08/21/24, 17:45

Commit message

ext:fluid RenderingContext is in the bad habit of extending
fluid standalone RenderingContext with the two methods
setRequest() and getRequest() that are not part of fluid
standalone RenderingContextInterface.

This is ugly with type hinting and can't be changed in a
good way due to liskov collisions on method signatures in
view helpers.

Fluid standalone also does not want to add these methods
itself since it - as a view - wants to avoid dependencies
to PSR-7.

Fluid standalone instead added setAttribute(), hasAttribute()
and getAttribute() to RenderingContextInterface. This allows
adding "arbitrary" objects.

The patch makes use of this: On the setter side, the
RenderingContextFactory->create() is extended to accept
the request and set it as attribute, on the has/getter side
all consumers are adapted.

This deprecates setRequest() and getRequest(), which are
changed to transparently work with the attribute instead.

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 1

Files 71

Show 51 more files