fix(concern): ensure state path matches in relationship entanglement #19122
+1
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Prevents coordinated relationship loading when multiple ComponentX::make()->relationship() components reference the same HasOne relationship but use different state paths.
Coordination is now applied only if the components share an identical state path.
Related Issue and Mergerequest:
#18826
#18827
Problem
The coordination logic assumes that components pointing to the same relationship should always share state. However, there are valid scenarios where multiple components intentionally use different state paths while referencing the same relationship.
In these cases, forcing coordinated loading causes one component to override another component’s state, leading to unexpected behavior.
Solution
Before applying the coordinated loading behavior, this PR compares the state paths of all components referencing the relationship.
Visual changes
None
Functional changes
composer cscommand.