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

[FEATURE] Attributes for RenderingContext #832

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

s2b
Copy link
Contributor

@s2b s2b commented Nov 22, 2023

This adds the ability to attach arbitrary attributes to the rendering context. All popular usages of Fluid out there extend the rendering context implementation of Fluid and don't actually implement the whole interface, so we should be able to change the interface as well.

As a result of this, TYPO3 CMS will be able to drop its own rendering context implementation, which will make the integration more straightforward.

@mbrodala
Copy link
Member

Hm, we should reconsider the name "attribute" here.

Given that Fluid is often used for HTML, we have a confusion with HTML attributes.
Given that Fluid is written in PHP, we have a confusion with PHP attributes.

So maybe simply data or properties would be better.

@s2b s2b force-pushed the feature/renderingContextAttributes branch from 3b4131e to faa1b04 Compare November 22, 2023 11:07
@s2b
Copy link
Contributor Author

s2b commented Nov 22, 2023

I understand the naming conflicts, but I'm not sure if data or properties are a better fit. withData() has the singular/plural issue, withProperty() sounds to me like simple values, not complex objects (like a request object). withAttribute() is already known from PSR-7.

https://www.php-fig.org/psr/psr-7/#321-psrhttpmessageserverrequestinterface

@mbrodala
Copy link
Member

Hm, indeed. The TYPO3 core context uses the term "aspect" but that's maybe a different scope. Given these circumstances, "attribute" may indeed be a good choice.

This adds the ability to attach arbitrary attributes to the rendering
context. All popular usages of Fluid out there extend the rendering
context implementation of Fluid and don't actually implement the
whole interface, so we should be able to change the interface as
well.

As a result of this, TYPO3 CMS will be able to drop its own rendering
context implementation, which will make the integration more
straightforward.
@s2b s2b force-pushed the feature/renderingContextAttributes branch from faa1b04 to cb47bd5 Compare November 22, 2023 14:40
@s2b s2b requested a review from lolli42 November 22, 2023 14:41
@s2b s2b merged commit beea852 into main Nov 23, 2023
4 checks passed
@s2b s2b deleted the feature/renderingContextAttributes branch November 23, 2023 09:08
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.

None yet

3 participants