diff --git a/src/Psalm/Config.php b/src/Psalm/Config.php index 08bc9604f2e..878d439a023 100644 --- a/src/Psalm/Config.php +++ b/src/Psalm/Config.php @@ -961,7 +961,6 @@ private static function fromXmlAndPaths( 'reportInfo' => 'report_info', 'restrictReturnTypes' => 'restrict_return_types', 'limitMethodComplexity' => 'limit_method_complexity', - 'triggerErrorExits' => 'trigger_error_exits', ]; foreach ($booleanAttributes as $xmlName => $internalName) { @@ -1096,6 +1095,13 @@ private static function fromXmlAndPaths( $config->infer_property_types_from_constructor = $attribute_text === 'true' || $attribute_text === '1'; } + if (isset($config_xml['triggerErrorExits'])) { + $attribute_text = (string) $config_xml['triggerErrorExits']; + if ($attribute_text === 'always' || $attribute_text === 'never') { + $config->trigger_error_exits = $attribute_text; + } + } + if (isset($config_xml->projectFiles)) { $config->project_files = ProjectFileFilter::loadFromXMLElement($config_xml->projectFiles, $base_dir, true); }