From 29b6d6b9187a174d37630ef8c34432c5de103e8c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 28 Apr 2024 16:20:44 +0200 Subject: [PATCH] Add phpstan version in report --- dev/tools/apstats.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dev/tools/apstats.php b/dev/tools/apstats.php index e223fc66c88..d4de218a253 100755 --- a/dev/tools/apstats.php +++ b/dev/tools/apstats.php @@ -139,6 +139,15 @@ if ($dirscc != 'disabled') { } // Get technical debt with PHPStan +$output_arrtd = array(); +if ($dirphpstan != 'disabled') { + $commandcheck = ($dirphpstan ? $dirphpstan.'/' : '').'phpstan --version'; + print 'Execute PHPStan to get the version: '.$commandcheck."\n"; + $resexectd = 0; + exec($commandcheck, $output_arrtd, $resexectd); +} +$phpstanversion = $output_arrtd[0]; + $output_arrtd = array(); if ($dirphpstan != 'disabled') { $commandcheck = ($dirphpstan ? $dirphpstan.'/' : '').'phpstan --level='.$phpstanlevel.' -v analyze -a build/phpstan/bootstrap.php --memory-limit 5G --error-format=github'; @@ -1035,7 +1044,7 @@ if ($dirphpstan != 'disabled') { ]}); '; $html .= '
'."\n"; - $html .= '

Technical debt (PHPStan level '.$phpstanlevel.' -> '.$nblines.' warnings)

'."\n"; + $html .= '

Technical debt ('.$phpstanversion.' - level '.$phpstanlevel.' -> '.$nblines.' warnings)

'."\n"; $html .= '
'."\n"; $html .= '
'."\n";