Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[Yaml] Fix parsing of block scalars in arrays#51444
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
carsonbot commentedAug 21, 2023
Hey! I see that this is your first PR. That is great! Welcome! Symfony has acontribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
carsonbot commentedAug 21, 2023
Hey! Thanks for your PR. You are targeting branch "5.4" but it seems your PR description refers to branch "6.3 for bug fixes". Cheers! Carsonbot |
…lds in reference objects. This is, according to the OpenApi spec, not legal. The lack of throwing an exception in situations like this lead to extra loops and a notable performance hit when working with larger specs like Stripe.
@mtarld, I don't mean to rush you, but I am allowing myself to ping you in case you missed the notification. Lmk if there is something you would like to see changed in order to get this merged. Thank you. |
Hey@NickSdot! |
Thank you very much for working on this@NickSdot and sorry for the late review. I wondered why we actually needed two separate conditions and found out that there was also a little bug in |
Thank you for taking this on@xabbuh. Yes, you spotted what I didn't fully understand. ;-) However, glad a fix got merged! |
Uh oh!
There was an error while loading.Please reload this page.
Valid Yaml
Failing Test diff
Notes
Similar cases that use block scalar folding are correctly handled by the parser. However, if the block scalar folding is in arrays the returned value is an empty string.
An example YAML file which is resulting in a broken parse is the Stripe OpenApi spec whichcan be found here. There are exactly 100 broken values when parsed.
I didn't consider this as a BC break since I assume that an empty string as a return value is in no ones interest. Feel free to let me know if you think otherwise and want me to target another branch.