[TASK] Use RenderingContext->setAttribute() (#922) #923
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.