8000 minor #10081 [FrameworkBundle] Pretty Ppint json ouput of yaml:lint c… · symfony/symfony@78d49fb · GitHub
[go: up one dir, main page]

Skip to content

Commit 78d49fb

Browse files
committed
minor #10081 [FrameworkBundle] Pretty Ppint json ouput of yaml:lint command (lyrixx)
This PR was merged into the 2.5-dev branch. Discussion ---------- [FrameworkBundle] Pretty Ppint json ouput of yaml:lint command | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- 689e9bf [FrameworkBundle] Pretty Ppint json ouput of yaml:lint command
2 parents 4ad343b + 689e9bf commit 78d49fb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Command;
1313

14+
if (!defined('JSON_PRETTY_PRINT')) {
15+
define('JSON_PRETTY_PRINT', 128);
16+
}
17+
1418
use Symfony\Component\Console\Command\Command;
1519
use Symfony\Component\Console\Input\InputInterface;
1620
use Symfony\Component\Console\Input\InputOption;
@@ -151,7 +155,7 @@ private function displayJson(OutputInterface $output, $filesInfo)
151155
}
152156
});
153157

154-
$output->writeln(json_encode($filesInfo));
158+
$output->writeln(json_encode($filesInfo, JSON_PRETTY_PRINT));
155159

156160
return min($errors, 1);
157161
}

0 commit comments

Comments
 (0)
0