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: Add function helpers to Eel and remove magic q
#1580
!!! FEATURE: Add function helpers to Eel and remove magic q
#1580
Conversation
121bc06
to
097353c
Compare
I wonder when this would be breaking… If I am just a "regular Neos integrator", this would be transparent to me, no? I mean, |
@kdambekalns q will be available as normal in fusion. It just has to be added to the fusion configuration in a separate pr. Currently cleaning this up |
097353c
to
e2ceb30
Compare
Function helpers are static functions that are available in Eel without a containing helper. This change removes the default q variable and instead adds a static method `q` to the flowQuery class that can be used as helper function with the following configuration: ``` Neos: Fusion: defaultContext: q: 'Neos\Eel\FlowQuery\FlowQuery::q' ContentRepository: labelGenerator: eel: defaultContext: q: Neos\Eel\FlowQuery\FlowQuery::q ```
e2ceb30
to
a56e1d8
Compare
The Neos side of this pr is here: neos/neos-development-collection#2505 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple comments, but looks good otherwise.
Co-Authored-By: Alexander Berl <a.berl@outlook.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good by reading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order of type and name in @param
is reversed…
Co-Authored-By: Karsten Dambekalns <karsten@dambekalns.de>
@kdambekalns Adjusted as requested. Please reapprove so i can finally merge |
As I said, if you enabled contributor edits, I'd have fixed it myself right away. ;) |
@kdambekalns usually this is always on on my prs, no clue why not here. I probably wurstfingered it. Or github changed the default and i have to look for it explicitly now |
Function helpers are static functions that are available in Eel without a containing helper. This
change removes the default q variable and instead adds a static method
q
to the flowQueryclass that is used as helper function with the following configuration:
Note: Nested pathes as identifiers for function-helpers are not allowed and will raise an exception.
This is breaking as it makes it necessary to add the configuration above to Neos.Fusion and Neos.ContentRepository. Also custom code that uses FlowQuery and relies on q beeing always present will have to be adjusted.
Upgrade Instructions:
Only if you are using the EelUtility in to evaluate expressions with
q
AND are using a custom defaultContextConfiguration you have to make sure that the configuration lineq: 'Neos\Eel\FlowQuery\FlowQuery::q'
is added to this configuration.