Skip to content

Can't parse YAML that the parser used to be able to parse #25786

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

Closed
alexpott opened this issue Jan 13, 2018 · 3 comments
Closed

Can't parse YAML that the parser used to be able to parse #25786

alexpott opened this issue Jan 13, 2018 · 3 comments

Comments

@alexpott
Copy link
Contributor

Q A
Bug report? yes
Feature request? no
BC Break report? yes
RFC? no
Symfony version first occurred in 3.3

Symfony 3.2 is able to parse yaml that looks like this:

factory.keyvalue.expirable: 
  {}
  # Default key/value expirable storage service to use.
  # @default keyvalue.database.expirable
  # default: keyvalue.database.expirable

Symfony 3.3+ it results in Uncaught Symfony\Component\Yaml\Exception\ParseException: Unable to parse at line 2 (near "{}")

Using git bisect shows that this break was introduced by #25241

@xabbuh
Copy link
Member

xabbuh commented Jan 13, 2018

Which patch version of Symfony 3.3 did you use when the error occurred? Does it still exist in 3.3.15?

@alexpott
Copy link
Contributor Author

@xabbuh it occurs on the 3.3 branch and 3.4 - so the development branches.

@alexpott
Copy link
Contributor Author

Over in #25787 I managed to show that the following YAML also works on 3.2 but fails on 3.3 and 3.4:

a:
    d:
        1.1
# comment

xabbuh added a commit that referenced this issue Feb 16, 2018
…pott)

This PR was squashed before being merged into the 3.4 branch (closes #25787).

Discussion
----------

Yaml parser regression with comments and non-strings

| Q             | A
| ------------- | ---
| Branch?       | 3.3 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | no
| Fixed tickets | #25786
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

a7e2a49 Yaml parser regression with comments and non-strings
@xabbuh xabbuh closed this as completed Feb 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants