Skip to content

Fix invalid yaml #12880

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 2, 2020
Merged

Fix invalid yaml #12880

merged 1 commit into from
Jan 2, 2020

Conversation

jschaedl
Copy link
Contributor

@jschaedl jschaedl commented Jan 2, 2020

Because deprecated: 'The "%alias_id%" alias is deprecated. Don\'t use it anymore.' is not valid Yaml, it leads to this error:

[OK] All 1 YAML files contain valid syntax.

Unexpected characters near "t use it anymore.

The yaml specification says:

All non-printable characters must be escaped. YAML escape sequences use the “\” notation common to most modern computer languages. Each escape sequence must be parsed into the appropriate Unicode character. The original escape sequence is a presentation detail and must not be used to convey content information.

Note that escape sequences are only interpreted in double-quoted scalars. In all other scalar styles, the “\” character has no special meaning and non-printable characters are not available.

So I think removing the ' will help users who copy the configuration from the documentation.

@javiereguiluz
Copy link
Member

@jschaedl thanks for fixing this issue and thanks for the detailed explanation!

javiereguiluz added a commit that referenced this pull request Jan 2, 2020
This PR was merged into the 4.3 branch.

Discussion
----------

Fix invalid yaml

Because `deprecated: 'The "%alias_id%" alias is deprecated. Don\'t use it anymore.'` is not valid Yaml, it leads to this error:

[OK] All 1 YAML files contain valid syntax.
>> Unexpected characters near "t use it anymore.

The yaml specification says:

> All non-printable characters must be escaped. YAML escape sequences use the “\” notation common to most modern computer languages. Each escape sequence must be parsed into the appropriate Unicode character. The original escape sequence is a presentation detail and must not be used to convey content information.

> Note that escape sequences are only interpreted in double-quoted scalars. In all other scalar styles, the “\” character has no special meaning and non-printable characters are not available.

So I think removing the `'` will help users who copy the configuration from the documentation.

Commits
-------

84151dc Fix invalid yaml
@javiereguiluz javiereguiluz merged commit 84151dc into symfony:4.3 Jan 2, 2020
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.

4 participants