From 4f87da19e2d080734d3835dbe05a80e90f433076 Mon Sep 17 00:00:00 2001 From: kkmuffme <11071985+kkmuffme@users.noreply.github.com> Date: Fri, 18 Aug 2023 14:45:58 +0200 Subject: [PATCH 1/2] stubs exec param-out for $output --- stubs/CoreGenericFunctions.phpstub | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/stubs/CoreGenericFunctions.phpstub b/stubs/CoreGenericFunctions.phpstub index 2a5a74d71b7..89b18d0a444 100644 --- a/stubs/CoreGenericFunctions.phpstub +++ b/stubs/CoreGenericFunctions.phpstub @@ -1786,3 +1786,14 @@ if (defined('GLOB_BRACE')) { function glob (string $pattern, int $flags = 0): array|false {} } +/** + * @psalm-template TOutput of array|null + * + * @param TOutput $output + * @param-out (TOutput is null ? list : array) $output + * @param-out int $result_code + * + * @psalm-taint-specialize + * @psalm-taint-sink shell $command + */ +function exec(string $command, &$output = null, int &$result_code = null): string|false {} From b1c25fa30a2a6add23a9eedc51d3f38594fc26fc Mon Sep 17 00:00:00 2001 From: Bruce Weirdan Date: Thu, 24 Aug 2023 03:32:18 +0200 Subject: [PATCH 2/2] Show success message and type stats with GHA formatter --- src/Psalm/IssueBuffer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Psalm/IssueBuffer.php b/src/Psalm/IssueBuffer.php index 8adb31ead82..e7dfdda9145 100644 --- a/src/Psalm/IssueBuffer.php +++ b/src/Psalm/IssueBuffer.php @@ -706,7 +706,7 @@ public static function finish( if (in_array( $project_analyzer->stdout_report_options->format, - [Report::TYPE_CONSOLE, Report::TYPE_PHP_STORM], + [Report::TYPE_CONSOLE, Report::TYPE_PHP_STORM, Report::TYPE_GITHUB_ACTIONS], )) { echo str_repeat('-', 30) . "\n";