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

[9.x] Return model when casting attribute #45539

Merged
merged 1 commit into from Jan 6, 2023
Merged

Conversation

driesvints
Copy link
Member

@driesvints driesvints commented Jan 6, 2023

Right now, when setting an attribute directly through setAttribute that has an Attribute cast, it won't return anything while the behavior of all the other calls to setAttribute is to return the model. Given that the return of setAttributeMarkedMutatedAttributeValue is mixed but nothing was returned, it seems to me that this was forgotten.

setMutatedAttributeValue also doesn't explicitly returns the model but people can decide for themselves to do that or not in the mutator.

Fixes #45537

@driesvints driesvints changed the title Return model when casting attribute [9.x] Return model when casting attribute Jan 6, 2023
@taylorotwell taylorotwell merged commit 8c9ae32 into 9.x Jan 6, 2023
@taylorotwell taylorotwell deleted the fix-attribute-return branch January 6, 2023 14:20
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.

Inconsistent behavior with setAttribute() and custom mutators
2 participants