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

remove translatable fields from casting and add tests #5772

Merged
merged 2 commits into from
Feb 13, 2025

Conversation

pxpm
Copy link
Contributor

@pxpm pxpm commented Feb 13, 2025

WHY

BEFORE - What was wrong? What was happening before this PR?

In continuation of the work on #5770

Basically since spatie introduced "auto-casts" in the translatable model, some of our functionality was broken.

We have previously fixed the issue found in the failing test suite, but we didn't had everything covered, so this one escaped us.

AFTER - What is happening after this PR?

I've now added a test for it too, and fields can be properly translated again.

HOW

How did you achieve that, in technical terms?

Added a check on our "decode" script (used for other functionalities), to not cast if the attribute is translatable.

Is it a breaking change?

No

@pxpm pxpm merged commit df6622d into main Feb 13, 2025
3 checks passed
@pxpm pxpm deleted the fix-translatable-fields branch February 13, 2025 14:15
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.

2 participants