Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jul 21, 2024
Merged

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

merged 1 commit into from
Jul 21, 2024

Conversation

lolli42
Copy link
Member

@lolli42 lolli42 commented Jul 21, 2024

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.

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.
@lolli42 lolli42 merged commit 381569e into main Jul 21, 2024
8 checks passed
@lolli42 lolli42 deleted the lolli-2 branch July 21, 2024 14:08
lolli42 added a commit that referenced this pull request Jul 21, 2024
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.
lolli42 added a commit that referenced this pull request Jul 21, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants