Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Yaml] quote all dumped unicode spaces #39769

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 10, 2021
Merged

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Jan 9, 2021

Q A
Branch? 4.4
Bug fix? no
New feature? no
Deprecations? no
Tickets Fix #39767
License MIT
Doc PR

@xabbuh
Copy link
Member Author

xabbuh commented Jan 9, 2021

Technically, this change is not needed, but it hopefully makes the dumped YAML a bit more readable and avoids confusion.

@fabpot
Copy link
Member

fabpot commented Jan 10, 2021

Thank you @xabbuh.

@fabpot fabpot merged commit 4cba31e into symfony:4.4 Jan 10, 2021
@xabbuh xabbuh deleted the issue-39767 branch January 10, 2021 09:34
@jasonvarga
Copy link

Thank you very much for fixing the issue, but I do want to comment out how you've said "this change is not needed".

When we go to parse that dumped unquoted yaml string, it would break.

For instance, if the dumped ideographic string was there without quotes like this:

foo:  

Then we'd see an exception like this:

Unable to parse at line 20 (near "foo:  ").

It appears to only throw that exception if the only thing there is the ideological space (and optionally other whitespace). If there's a regular character in there, it works fine. (Here there's bar then the unicode space)

foo: bar 

I don't know if this warrants a bug report, but I thought it was at least worth mentioning. Thanks again for the quick fix!

@xabbuh
Copy link
Member Author

xabbuh commented Jan 10, 2021

Thanks for the feedback. This indeed looks like a bug in the parser to me. I am going to look into it.

@xabbuh
Copy link
Member Author

xabbuh commented Jan 11, 2021

@jasonvarga Can you confirm that #39787 fixes this as well?

@jasonvarga
Copy link

Seems good!

nicolas-grekas added a commit that referenced this pull request Jan 12, 2021
…pping keys and values (xabbuh)

This PR was merged into the 4.4 branch.

Discussion
----------

[Yaml] a colon followed by spaces exclusively separates mapping keys and values

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #39769 (comment)
| License       | MIT
| Doc PR        |

Commits
-------

f72c6a5 a colon followed by spaces exclusively separates mapping keys and values
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.

5 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.