Skip to content

[JsonEncoder] Allow to warm up object and list #59536

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

Merged
merged 1 commit into from
Jan 25, 2025

Conversation

mtarld
Copy link
Contributor

@mtarld mtarld commented Jan 17, 2025

Q A
Branch? 7.3
Bug fix? no
New feature? yes
Deprecations? no
Issues
License MIT

As discussed with @chalasr, configuration in FrameworkBundle must be avoided as much as possible.
That's why #59396 might not be the way to go.

Instead, this PR addresses the most common use cases, which are warming up cache files for GivenClass and list<GivenClass>.

This can be configured by setting the object and list attributes of json_encoder.encodable, or asObject and asList of the JsonEncodable attribute accordingly.

@mtarld mtarld force-pushed the feat/json-encoder-encode-item-and-list branch from 322cc5b to 90ca852 Compare January 17, 2025 16:34
@mtarld mtarld changed the title [JsonEncoder] Allow to warm up item and list [JsonEncoder] Allow to warm up object and list Jan 17, 2025
@nicolas-grekas
Copy link
Member

Maybe missing changelog entry?
Also an example / snippet in the PR description that could help bootstrap the doc / a blog post mentionning this?

@mtarld mtarld force-pushed the feat/json-encoder-encode-item-and-list branch from 90ca852 to cb36ec0 Compare January 23, 2025 08:20
@fabpot
Copy link
Member

fabpot commented Jan 25, 2025

Thank you @mtarld.

@fabpot fabpot merged commit 1f83bf1 into symfony:7.3 Jan 25, 2025
5 of 11 checks passed
@mtarld mtarld deleted the feat/json-encoder-encode-item-and-list branch January 25, 2025 08:39
@fabpot fabpot mentioned this pull request May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants