Skip to content

[9.x] Clear cast cache when setting attributes using arrow#42852

Merged
taylorotwell merged 1 commit intolaravel:9.xfrom
shaffe-fr:fix/json-castable-arrow
Jun 20, 2022
Merged

[9.x] Clear cast cache when setting attributes using arrow#42852
taylorotwell merged 1 commit intolaravel:9.xfrom
shaffe-fr:fix/json-castable-arrow

Conversation

@shaffe-fr
Copy link
Copy Markdown
Contributor

Hi,

It's sometime convenient to use the arrow notation to set the value of a class casted attribute.

Here is an example in a Nova resource:

Boolean::make('New order notification', 'settings->newOrderNotification')

This PR fixes a bug that prevented the model to detect the change because of the cache.

The commit can be cherry-picked in the 8.x branch.

Thanks

@shaffe-fr shaffe-fr force-pushed the fix/json-castable-arrow branch from 3208848 to 92d9294 Compare June 17, 2022 09:09
@taylorotwell taylorotwell merged commit ae60983 into laravel:9.x Jun 20, 2022
@GrahamCampbell GrahamCampbell changed the title Clear cast cache when setting attributes using arrow [9.x] Clear cast cache when setting attributes using arrow Jun 20, 2022
@shaffe-fr shaffe-fr deleted the fix/json-castable-arrow branch June 24, 2022 17:18
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