You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
calls:
# This is a temporary measure. JSON:API should not need to be aware of the Content Moderation module.
- [setLatestRevisionCheck, ['@?access_check.latest_revision']] # This is only injected when the service is available.
using the following code:
useSymfony\Component\Yaml\Yaml;
$a = <<<YMLcalls: # This is a temporary measure. JSON:API should not need to be aware of the Content Moderation module. - [setLatestRevisionCheck, ['@?access_check.latest_revision']] # This is only injected when the service is available.YML;
dump(Yaml::parse($a));
PHP Fatal error: Uncaught Symfony\Component\Yaml\Exception\ParseException: Unexpected token "# This is only injected when the service is available." at line 3 (near "- [setLatestRevisionCheck, ['@?access_check.latest_revision']] # This is only injected when the service is available."). in /Volumes/dev/symfony/src/Symfony/Component/Yaml/Parser.php:1210
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered:
This PR was squashed before being merged into the 6.4 branch.
Discussion
----------
[Yaml] fix inline notation with inline comment
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix#59378
| License | MIT
Recent commit broke parsing yam like:
```yaml
calls:
# This is a temporary measure. JSON:API should not need to be aware of the Content Moderation module.
- [setLatestRevisionCheck, ['@?access_check.latest_revision']] # This is only injected when the service is available.
```
This MR adds a test and fixes this.
Commits
-------
dccac0b [Yaml] fix inline notation with inline comment
Symfony version(s) affected
6.4
Description
The yaml parser errors on inline comments after 8a3a57d
How to reproduce
Parse the following yaml before and after 8a3a57d
using the following code:
before this will output:
after this will output
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: