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

Unset classCastCache for given key #742

Merged
merged 3 commits into from
Oct 6, 2023
Merged

Conversation

bskl
Copy link
Contributor

@bskl bskl commented Sep 15, 2022

"getFormattedValue" method is calling laravel will get the value from the classCastCache property. So old and new values are the same. This PR unset the classCastCache for given key so old value is not retrieve from cache.
Fix issue: #588

@parallels999
Copy link

Hi, could you add some tests?

@anteriovieira anteriovieira added the help wanted Assistance or contributions needed label Mar 15, 2023
@bskl
Copy link
Contributor Author

bskl commented May 1, 2023

Hi, sorry for the delay. I added test.

Copy link
Contributor Author

@bskl bskl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add test.

@erikn69
Copy link
Contributor

erikn69 commented Aug 25, 2023

I don't have much experience with custom cast, but I went through the laravel code and couldn't find any problem.
It does not change the functionality for those who do not use that feature

@MortenDHansen MortenDHansen merged commit 8efe5b3 into owen-it:master Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Assistance or contributions needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants