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: Remove magic underscore access for internal node properties #5015

Draft
wants to merge 6 commits into
base: 9.0
Choose a base branch
from

Conversation

mhsdesign
Copy link
Member

Resolves: #4208
Related: #4921

Upgrade instructions

Review instructions

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
  • Reviewer - PR Title is brief but complete and starts with FEATURE|TASK|BUGFIX
  • Reviewer - The first section explains the change briefly for change-logs
  • Reviewer - Breaking Changes are marked with !!! and have upgrade-instructions

@mhsdesign
Copy link
Member Author

mhsdesign commented May 4, 2024

one todo is: how to sort by creation date in Neos 9?? Something like node.timestamps.originalCreated
#4208 (comment)

in our weekly from the 26. we discussed that instead of adding a new flowquery or a magic parameter, we probably want to support the old legacy 8.3 syntax _creationDateTime or _lastModificationDateTime or even _lastPublicationDateTime.

The question is if these modifiers should only work for the sort operation or also for property and filter as well as part of a fizzle query [_creationDateTime = 123]. (Fizzle is almost impossible to archive with the optimisation #4712 in place)

@mhsdesign mhsdesign marked this pull request as draft May 4, 2024 11:27
@mhsdesign
Copy link
Member Author

another todo is: as we relocate the sort operation to the other flow-queries and touch its logic i seem to have to carry out the burden to migrate the old functional test https://github.com/neos/neos-development-collection/blob/fe0063b7e4fbaea9b0a72abfd323354fabf42173/Neos.Neos/Tests/Functional/FlowQueryOperations/SortOperationTest.php to behat.

mhsdesign added a commit that referenced this pull request May 9, 2024
@kitsunet
Copy link
Member

kitsunet commented May 9, 2024

I do not understand why you did this?

@mhsdesign
Copy link
Member Author

mhsdesign commented May 9, 2024

That was what i have been discussing in #4208 or in the meetings i thought but it seems we have talked past each other?

My thesis in short:

We have the _* underscore access syntax to access actual php object properties of the Node. Due to the ESCR rewrite the Node object looks completely different and has way less getters / properties. These are the new properties:

  • _subgraphIdentity
  • _nodeAggregateId
  • _originDimensionSpacePoint
  • _classification
  • _nodeTypeName
  • _nodeName
  • _timestamps

While these are the ones known from 8.3

The actual important and ones used in 8.3 like _identifier _depth _parent _hiddenAfterDateTime _hiddenBeforeDateTime etc (see #4208 (comment)) will not work and have to migrated with rector.

To avoid confusion about which magic underscore properties still exist in 9.0 a simple way is - it thought we agreed upon this in the meeting from the 19.01 link - to NOT have any underscore property logic and remove any magic from this syntax. Like one can use an underscore now in consumer land but it is never any more special than any other character.

Thats why this pr remove partially implemented legacy support for _identifier as well as _depth as we have rector migrations for this to properly use the respective eel helper or eel property access directly.

There is a little but as discussed in on the 26.04 we concluded to still allow sorting nodes by date via the q().sort() we will likely have to make one exception regarding underscore properties: The sort operation will translate _lastPublicationDateTime and respective things to the 9.0 equivalent logic internally instead of having to introduce another sort operation or a special parameter or another special syntax like .sort(['$$lastModified']) or such.

@kitsunet
Copy link
Member

kitsunet commented May 9, 2024

This is all clear, but

Extracted everything i though this pr was originally meant to be into #5015 and added the things i found missing.

why, why didn't you just add the things missing to my original PR?

@mhsdesign
Copy link
Member Author

Because i thought it would get too complex and the _hiddenInIndex thing is somehow related but a different task and should imo deserve its own pr. (Also i asked you in slack if im allowed to do this :D)

@kitsunet
Copy link
Member

kitsunet commented May 9, 2024

Also i asked you in slack if im allowed to do this :D

Too much going on LOL, seems still a bit weird but 🤷

neos-bot pushed a commit to neos/neos that referenced this pull request May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"internal" node properties in Fusion/UI
2 participants