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

[5.5] Remove attribute filling from pivot model #23401 #23554

Merged
merged 2 commits into from
Mar 15, 2018

Conversation

sylvain-gaffie-sociomantic
Copy link
Contributor

@sylvain-gaffie-sociomantic sylvain-gaffie-sociomantic commented Mar 15, 2018

This PR is a copy of this pr that was merged for laravel 5.6.
Laravel 5.6 needs a new version of php, and since is only a one line change I am hoping for this to get merged in 5.5 as well.

The original text from @staudenmeir . cheers.

When querying a pivot relationship with a specified model (using()) the attributes are set using forceFill(), causing custom mutators to be called.

This is inconsistent with non-pivot models and also unnecessary, since the values are immediately overwritten with the raw attributes.

Fixes #23234.

@taylorotwell taylorotwell merged commit 260a3f8 into laravel:5.5 Mar 15, 2018
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 this pull request may close these issues.

3 participants