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

Adjustments to new Reference DTOs #3844

Merged
merged 4 commits into from
Nov 1, 2024
Merged

Adjustments to new Reference DTOs #3844

merged 4 commits into from
Nov 1, 2024

Conversation

kitsunet
Copy link
Member

WIP, this is for neos/neos-development-collection#5148

Might still need adjustments once the other is finalized.

@github-actions github-actions bot added the 9.0 label Aug 30, 2024
);
if (($referenceConfiguration['ui']['showInCreationDialog'] ?? false) === true) {
$referencesToWriteForCurrentElement = NodeReferencesToWrite::fromNameAndTargets(ReferenceName::fromString($elementName), $elementValue);
$initialReferences = $initialReferences === null ? $referencesToWriteForCurrentElement : $initialReferences->merge($referencesToWriteForCurrentElement);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would just always merge here and initialise initialReferences with empty NodeReferencesToWrite and then let the core optimise this away :D

@@ -107,6 +108,14 @@ public function withInitialPropertyValues(PropertyValuesToWrite $newInitialPrope
);
}

public function withInitialReferences(NodeReferencesToWrite $newInitialReferences): self
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice :D

@mhsdesign mhsdesign merged commit b810deb into 9.0 Nov 1, 2024
8 of 10 checks passed
@mhsdesign mhsdesign deleted the bugfix/references-on-copy branch November 1, 2024 10:19
mhsdesign added a commit that referenced this pull request Nov 1, 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.

2 participants