TYPO3 / Fluid

Fluid template rendering engine - Standalone version
GNU Lesser General Public License v3.0
152 stars 93 forks source link

[TASK] Use RenderingContext->setAttribute() (#922) #923

Closed lolli42 closed 3 months ago

lolli42 commented 3 months ago

When we designed the RenderingContext functionality to add "arbitrary" objects to RenderingContext (like a Request) in a recent minor release, we tried start making RenderingContext immutable and added the implementation using a "with'er".

This is in general a good idea: RenderinContext should be immutable.

It is however problematic to do this with this single property: It leads to too many and partially breaking changes when consumers try to use this.

As such, the patch rolls back to a setAttribute() approach. With the default implementation being done in the Fluid delivered RenderingContext, this change is currently not considered breaking since no (known) consumer actually uses it.

To make RenderingContext immutable, we need a new approach, maybe re-starting with a new class that does it. This is a topic for a different major version, though.