Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[JsonStreamer] Add synthetic properties support#62069
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Really great improvement, this is quite painful for now in API Platform as we use |
src/Symfony/Component/JsonStreamer/Write/StreamWriterGenerator.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
27c57e0 to2b9f9d1CompareFromhttps://www.php.net/manual/en/language.oop5.property-hooks.php
Should we find another name? |
The reason for the name is actually similar to the reason in property hooks (a JsonStreamer property that is either backed by a PHP property or not). But it might indeed cause confusion, especially when the 2 different layers are closely tied to each other. |
GromNaN commentedOct 17, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
"synthetic" means that it is created from nothing, or from transforming other things. |
I like it. |
2b9f9d1 tobb12653CompareUpdated with the synthetic name instead. It's a nice name, I like it as well, thanks for the review. |
Thank you@mtarld. |
742d742 intosymfony:7.4Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This PR adds the support for
virtualsynthetic properties, which are basically values that are computed thanks to property metadata loaders only.This could be useful for projects that are generating highly dynamic object shape, such as API Platform.
/cc@soyuka