Skip to content
Permalink
Browse files

adding php & extension version info to baseline file to track changes…

… in execution environment when baselines are added to vcs (#1804)
  • Loading branch information...
SignpostMarv authored and muglug committed Jun 17, 2019
1 parent 5ab5ec2 commit de881767a5df2f8566950ac6a0aa52d3d15b83a5
Showing with 16 additions and 0 deletions.
  1. +16 −0 src/Psalm/ErrorBaseline.php
@@ -207,6 +207,22 @@ private static function writeToFile(
$filesNode = $baselineDoc->createElement('files');
$filesNode->setAttribute('psalm-version', PSALM_VERSION);
$extensions = array_merge(get_loaded_extensions(), get_loaded_extensions(true));
usort($extensions, 'strnatcasecmp');
$filesNode->setAttribute('php-version', implode('; ', array_merge(
[
('php:' . phpversion()),
],
array_map(
function (string $extension) : string {
return $extension . ':' . phpversion($extension);
},
$extensions
)
)));
foreach ($groupedIssues as $file => $issueTypes) {
$fileNode = $baselineDoc->createElement('file');

0 comments on commit de88176

Please sign in to comment.
You can’t perform that action at this time.