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

BUGFIX: Support nested fluid variables by using the original fluid method #1478

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
3 participants
@vertexvaar
Copy link
Contributor

commented Dec 10, 2018

What I did

With this patch it's possible to use the fluid variable nesting feature as well as a specific accessor per element on the path.

How I did it

I changed the code to use the original logic which resolves nested variables.

How to verify it

Create a fluid template with nested variables that access an array value:

{config.{type}.value.{flavor}}

Assign an array and the two keys:

$this->view->assign('type', 'thing');
$this->view->assign('flavor', 'yellow');
$this->view->assign('config', ['thing' => ['value' => ['yellow' => 'Okayish']]]);

Render the template and assert that the output is "Okayish"

Checklist

  • Code follows the PSR-2 coding style
  • Tests have been created, run and adjusted as needed
  • The PR is created against the lowest maintained branch
@vertexvaar

This comment has been minimized.

Copy link
Contributor Author

commented Dec 10, 2018

Whoops, there's a commit that should not be there. I gonna remove it.

@kdambekalns

This comment has been minimized.

Copy link
Member

commented Dec 12, 2018

Please provide a proper PR title and import the TYPO3Fluid namespaces (using an alias, if needed).

@vertexvaar vertexvaar force-pushed the vertexvaar:5.0 branch from 56c97fd to a250652 Dec 12, 2018

@vertexvaar vertexvaar changed the title 5.0 BUGFIX: Support nested fluid variables by using the original fluid method Dec 12, 2018

BUGFIX: Support nested fluid variables by using the original fluid me…
…thod

Neos.FluidAdaptor blocks the nested-variables-feature of fluid by overriding
the implementing method. This change relies on the parent method for path
resolving but still sets ObjectAccess as default accessor and supports
bool casting and the TemplateObjectAccessInterface interface.
All other parts are untouched. As a side effect you can now use the $accessors
parameter of the gtePath method is now usable.

fixes: #1477

@vertexvaar vertexvaar force-pushed the vertexvaar:5.0 branch from a250652 to ce4fab4 Dec 12, 2018

@albe
Copy link
Member

left a comment

Looks good codewise. Now if we could have a test to verify the fix, that would be great.

@stale

This comment has been minimized.

Copy link

commented May 30, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions!

@stale stale bot added the Stale label May 30, 2019

@albe

This comment has been minimized.

Copy link
Member

commented May 30, 2019

Though stale, still relevant.

@stale

This comment has been minimized.

Copy link

commented Jun 13, 2019

This issue has been automatically closed because it has not had activity for some time. But that does not need to be final. If you find the time to work on it, feel free to open it again. Thanks again for your contributions!

@stale stale bot closed this Jun 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.