-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[YAML] Nested array incorrectly parsed #25239
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
Comments
Do you know if this worked in a previous version? |
For 2.7.38 i get
|
Thanks for the response. I think this needs to be fixed in 3.3 as this is the oldest maintained version that has support for multi-line structures. However, we would still need to rewrite some of its logic. You can take a first look at https://github.com/symfony/symfony/compare/3.3...xabbuh:issue-25239?expand=1 which still needs some work to cover certain edge cases. |
@xabbuh did you advanced on that ? is it fixed already ? |
IIRC it's the same as #25379 (comment) |
Can you confirm that #33658 will solve your issue? |
i dont have the actual code at hand anymore, if the reproducer here now passes im fine :) |
@ro0NL I just tried your example with the following script: require __DIR__.'/vendor/autoload.php';
use Symfony\Component\Yaml\Yaml;
$yaml = <<<YAML
services:
foo:
class: Foo
arguments: ['@bar', '@baz', [
'@qux',
'%foo%',
bar,
123
]]
YAML;
dump(Yaml::parse($yaml)); The result is this:
|
… (xabbuh) This PR was merged into the 4.4 branch. Discussion ---------- [Yaml] fix parsing inline YAML spanning multiple lines | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Fix #25239 #25379 #31333 | License | MIT | Doc PR | Commits ------- 85a5c31 fix parsing inline YAML spanning multiple lines
Given
I get
While this is valid at http://www.yamllint.com/
To make it work in SF i had to change the last lines to
123]]
cc @xabbuh :-)
The text was updated successfully, but these errors were encountered: