Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit78d49fb

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 parents4ad343b +689e9bf commit78d49fb

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
namespaceSymfony\Bundle\FrameworkBundle\Command;
1313

14+
if (!defined('JSON_PRETTY_PRINT')) {
15+
define('JSON_PRETTY_PRINT',128);
16+
}
17+
1418
useSymfony\Component\Console\Command\Command;
1519
useSymfony\Component\Console\Input\InputInterface;
1620
useSymfony\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
returnmin($errors,1);
157161
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp