Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 78d49fb

Browse filesBrowse 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
Copy full SHA for 78d49fb

File tree

Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php
+5-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.