Skip to content

Commit e1b0255

Browse files
committed
fix triggerErrorExits not working
Fix #8270
1 parent cac9ec9 commit e1b0255

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Psalm/Config.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,6 @@ private static function fromXmlAndPaths(
961961
'reportInfo' => 'report_info',
962962
'restrictReturnTypes' => 'restrict_return_types',
963963
'limitMethodComplexity' => 'limit_method_complexity',
964-
'triggerErrorExits' => 'trigger_error_exits',
965964
];
966965

967966
foreach ($booleanAttributes as $xmlName => $internalName) {
@@ -1096,6 +1095,13 @@ private static function fromXmlAndPaths(
10961095
$config->infer_property_types_from_constructor = $attribute_text === 'true' || $attribute_text === '1';
10971096
}
10981097

1098+
if (isset($config_xml['triggerErrorExits'])) {
1099+
$attribute_text = (string) $config_xml['triggerErrorExits'];
1100+
if ($attribute_text === 'always' || $attribute_text === 'never') {
1101+
$config->trigger_error_exits = $attribute_text;
1102+
}
1103+
}
1104+
10991105
if (isset($config_xml->projectFiles)) {
11001106
$config->project_files = ProjectFileFilter::loadFromXMLElement($config_xml->projectFiles, $base_dir, true);
11011107
}

0 commit comments

Comments
 (0)