Skip to content

Update to relationLoaded() causes problems when accessing attributes on a model containing a period #55518

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

Closed
danharrin opened this issue Apr 22, 2025 · 3 comments · Fixed by #55519

Comments

@danharrin
Copy link
Contributor

Laravel Version

12.10.0

PHP Version

8.3

Database Driver & Version

No response

Description

#55471 introduces a problem when attempting to access attributes on a model that contain a .. The framework calls the relationLoaded() method, which was updated to handle . as nested relationships in that PR.

Here is the link to the line that calls the method:

return $this->isRelation($key) || $this->relationLoaded($key)

Here is a related test failure:
https://github.com/filamentphp/filament/actions/runs/14589554182/job/40966543141

Steps To Reproduce

https://github.com/danharrin/laravel-relation-loaded-bug-report/commit/f29cef4eab3f50bc5e359da1019a93bf10434834

@rodrigopedra
Copy link
Contributor

@danharrin can you review PR #55519?

@mortalkiller
Copy link

Same issue here

@siarheipashkevich
Copy link
Contributor

The same issue also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants