From 1a97613d5fd7ef5acac9f247263032a9c7d2ba3e Mon Sep 17 00:00:00 2001 From: robchett Date: Sun, 17 Sep 2023 12:46:06 +0100 Subject: [PATCH] Set ignoreInternalFunctionFalseReturn and ignoreInternalFunctionNullReturn to false by default --- config.xsd | 4 ++-- docs/running_psalm/configuration.md | 4 ++-- src/Psalm/Config.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config.xsd b/config.xsd index eb5f11e2c21..8016ac6c918 100644 --- a/config.xsd +++ b/config.xsd @@ -49,8 +49,8 @@ - - + + diff --git a/docs/running_psalm/configuration.md b/docs/running_psalm/configuration.md index f4976aaad83..05f65236f0c 100644 --- a/docs/running_psalm/configuration.md +++ b/docs/running_psalm/configuration.md @@ -213,7 +213,7 @@ When `true`, Psalm will check that the developer has caught every exception in g ignoreInternalFunctionFalseReturn="[bool]" > ``` -When `true`, Psalm ignores possibly-false issues stemming from return values of internal functions (like `preg_split`) that may return false, but do so rarely. Defaults to `true`. +When `true`, Psalm ignores possibly-false issues stemming from return values of internal functions (like `preg_split`) that may return false, but do so rarely. Defaults to `false`. #### ignoreInternalFunctionNullReturn @@ -222,7 +222,7 @@ When `true`, Psalm ignores possibly-false issues stemming from return values of ignoreInternalFunctionNullReturn="[bool]" > ``` -When `true`, Psalm ignores possibly-null issues stemming from return values of internal array functions (like `current`) that may return null, but do so rarely. Defaults to `true`. +When `true`, Psalm ignores possibly-null issues stemming from return values of internal array functions (like `current`) that may return null, but do so rarely. Defaults to `false`. #### inferPropertyTypesFromConstructor diff --git a/src/Psalm/Config.php b/src/Psalm/Config.php index 4ed53897532..2a99becb520 100644 --- a/src/Psalm/Config.php +++ b/src/Psalm/Config.php @@ -401,12 +401,12 @@ class Config /** * @var bool */ - public $ignore_internal_falsable_issues = true; + public $ignore_internal_falsable_issues = false; /** * @var bool */ - public $ignore_internal_nullable_issues = true; + public $ignore_internal_nullable_issues = false; /** * @var array