8000 Yaml dump - missing new line after TaggedValue · Issue #33354 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Yaml dump - missing new line after TaggedValue #33354

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
Selion05 opened this issue Aug 27, 2019 · 3 comments
Closed

Yaml dump - missing new line after TaggedValue #33354

Selion05 opened this issue Aug 27, 2019 · 3 comments

Comments

@Selion05
Copy link
Selion05 commented Aug 27, 2019

Symfony version(s) affected: x.y.z
symfony/yaml v4.3.4 Symfony Yaml Component

Description
If you dump an array with a high inline value an new line is missing after TaggedValue

How to reproduce

<?php

require __DIR__ . '/vendor/autoload.php';
use Symfony\Component\Yaml\Yaml;

$yaml = <<<YAML
services:
    service.id:
        arguments: [!tagged my.tag]
    service.id.2:
YAML;

$services = Yaml::parse($yaml, Yaml::PARSE_CUSTOM_TAGS);

$dumped = Yaml::dump($services, 8);

echo  $dumped;

results in

services:
    service.id:
        arguments:
            - !tagged
              my.tag    service.id.2: null

Possible Solution
Add a new line here

@Selion05 Selion05 changed the title Yaml dump - mising new line after TaggedValue Yaml dump - missing new line after TaggedValue Aug 27, 2019
@xabbuh
Copy link
Member
xabbuh commented Aug 29, 2019

Can you please try if #33377 fixes the issue for you?

@Selion05
Copy link
Author

that works!

@xabbuh
Copy link
Member
xabbuh commented Aug 29, 2019

@Selion05 Thank you very much for the feedback. 👍

xabbuh added a commit that referenced this issue Aug 29, 2019
This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml] fix dumping not inlined scalar tag values

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #33354
| License       | MIT
| Doc PR        |

Commits
-------

390f4f4 fix dumping not inlined scalar tag values
@xabbuh xabbuh closed this as completed Aug 29, 2019
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
0