You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Dresden sprint i experimented with @kitsunet to make the ProtectContextAware interface obsolete. The goal was to remove the coupling of EEL helpers in the php code - as this is imo not really clean and using this helper in pure php land fells odd. My proposal would be kind of breaking and introduce some complexity in the backwards compatible layer. #2976
After implementing this, i came to the conclusion, that i want to have a "allow" list for methods on other arbitrary context objects as well. Like i want to configure Psr\\Http\\Message\\Uri to allow withPath to be called (as its immutable).
(of course we could also just go ahead and introduce "new" computed properties in the read models - but this is not "public" api and might be a foot gun)
Low level API and implementation
Technically anyone can create their own contextFactory - even if we might not document it at first as we dont want to make things less obvious. For example things are already quite confusing how magic ArrayAccess __get and getters all play together: #2785
The above example where we make the PropertyCollection of the node work as an array would look like:
In the Dresden sprint i experimented with @kitsunet to make the ProtectContextAware interface obsolete. The goal was to remove the coupling of EEL helpers in the php code - as this is imo not really clean and using this helper in pure php land fells odd. My proposal would be kind of breaking and introduce some complexity in the backwards compatible layer.
#2976
After implementing this, i came to the conclusion, that i want to have a "allow" list for methods on other arbitrary context objects as well. Like i want to configure
Psr\\Http\\Message\\Uri
to allowwithPath
to be called (as its immutable).While discussion how
node.properties.foo
could work in the Neos 9 cr neos/neos-development-collection#4464 (comment) @bwaidelich and me also thought about an additional "read model" layer between php objects and eel.And surprise - this is imo - with relatively okay work doable.
A few examples:
Make any Helper an EEL Helper (without implementing the ProtectedContextAwareInterface):
Make the prs uri work in eel (enable
with*
methods)Make the
node.properties
behave like an array access (without "polluting" php code with ArrayAccess)or make
getProperty
andhasProperty
as well asequals
work directly on the node object:(of course we could also just go ahead and introduce "new" computed properties in the read models - but this is not "public" api and might be a foot gun)
Low level API and implementation
Technically anyone can create their own
contextFactory
- even if we might not document it at first as we dont want to make things less obvious. For example things are already quite confusing how magic ArrayAccess__get
and getters all play together: #2785The above example where we make the
PropertyCollection
of thenode
work as an array would look like:The text was updated successfully, but these errors were encountered: