Skip to content

Conversation

@Odion-DS
Copy link
Contributor

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

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

@github-project-automation github-project-automation bot moved this to Todo in Roadmap Jan 29, 2026
@danharrin danharrin added the bug Something isn't working label Jan 29, 2026
@danharrin danharrin added this to the v4 milestone Jan 29, 2026
@github-project-automation github-project-automation bot moved this from Todo to In Progress in Roadmap Jan 29, 2026
@danharrin danharrin merged commit 1f9c22d into filamentphp:4.x Jan 29, 2026
24 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Roadmap Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants