neos / neos-development-collection

The unified repository containing the Neos core packages, used for Neos development.
https://www.neos.io/
GNU General Public License v3.0
260 stars 221 forks source link

!!! TASK: Interdimensional relatives for node move #4993

Closed nezaniel closed 2 months ago

nezaniel commented 3 months ago

Builds on: #4982

This replaces the cumbersome MoveNodeMappings DTO with the far more lightweight, but surprisingly even more capable InterdimensionalSiblings DTO.

Upgrade instructions

This is breaky for 3rd party packages since the event DTOs are part of the API

Review instructions

First: Don't be afraid of the number of LoC added. That's just proper test coverage for MoveNode, finally.

For the refactoring, further assumptions are made (and enforced via constraint checks and tests):

1) Pure edge operation MoveNode is considered an pure edge operation, meaning no node is actually touched. This was also implied before, since MoveNode explicitly never updated any timestamps. Thus, no OrginDimensionSpacePoints are communicated anymore, just siblings per affected DSP. Hint: Neos' ChangeProjection needs to decide how to deal with MoveNode. Its tests pass anyway.

2) Only one parent (at most) per move operation As the RelationDistributionStrategy already states: the variants will be gathered (more or less, depending on the strategy) at the new parent, if given. That also means: no implicit parent changes. If a given sibling belongs to a different parent, this will lead to

3) Succeeding sibling has priority over preceding sibling The given succeeding sibling (and its further succeeding siblings) will be checked for applicability. If none is found and a preceding sibling is given, it (and its further preceding siblings) will be checked instead.

4) Preceding siblings are evaluated if given and no succeeding sibling is given

5) Non-determinable siblings If no succeeding sibling can be determined for the move operation, there are three cases

Checklist

nezaniel commented 2 months ago

Also, what are those: [...] ?

It's untouched; I guess it fails on a newer / older PHPStan version

nezaniel commented 2 months ago

...and was fixed by just merging 9.0