From cc239ce866fa499a177dd7160eeff5ee3e3efa66 Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 27 Aug 2024 04:55:42 +0200 Subject: [PATCH] Qual: Enable phan notices regarding array definitions (#30751) # Qual: Enable phan notices regarding array definitions This configuration change in phan will report NEW array types in phpdoc that are not specific about the array members. At level 6, phpstan also expects this. The exceptions in baseline.txt ensure this is only reported on new files or files were these missing typing directives are already fixed. --- dev/tools/phan/config.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/tools/phan/config.php b/dev/tools/phan/config.php index d8b201d33c2..c21f24692bf 100644 --- a/dev/tools/phan/config.php +++ b/dev/tools/phan/config.php @@ -419,12 +419,12 @@ return [ 'PhanCompatibleNegativeStringOffset', // return false positive 'PhanPluginConstantVariableBool', // a lot of false positive, in most cases, we want to keep the code as it is - 'PhanPluginUnknownArrayPropertyType', // this option costs more time to be supported than it solves time + // 'PhanPluginUnknownArrayPropertyType', // this option costs more time to be supported than it solves time 'PhanTypeArraySuspiciousNullable', // this option costs more time to be supported than it solves time 'PhanTypeInvalidDimOffset', // this option costs more time to be supported than it solves time 'PhanTypeObjectUnsetDeclaredProperty', 'PhanTypePossiblyInvalidDimOffset', // a lot of false positive, in most cases, we want to keep the code as it is - 'PhanPluginUnknownArrayFunctionReturnType', // a lot of false positive, in most cases, we want to keep the code as it is + // 'PhanPluginUnknownArrayFunctionReturnType', // a lot of false positive, in most cases, we want to keep the code as it is 'PhanPluginWhitespaceTab', // Dolibarr used tabs 'PhanPluginCanUsePHP71Void', // Dolibarr is maintaining 7.0 compatibility @@ -448,8 +448,8 @@ return [ 'PhanPluginRedundantAssignment', // Not essential, useless 'PhanPluginDuplicateCatchStatementBody', // Requires PHP7.1 - 50+ occurrences - 'PhanPluginUnknownArrayMethodParamType', // Too many troubles to manage. Is enabled in config_extended only. - 'PhanPluginUnknownArrayMethodReturnType', // Too many troubles to manage. Is enabled in config_extended only. + // 'PhanPluginUnknownArrayMethodParamType', // Too many troubles to manage. Is enabled in config_extended only. + // 'PhanPluginUnknownArrayMethodReturnType', // Too many troubles to manage. Is enabled in config_extended only. 'PhanUndeclaredGlobalVariable', // Too many false positives on .tpl.php files. Is enabled into config_extended only. // 'PhanPluginUnknownObjectMethodCall', // False positive for some class. Is enabled in config_extended only. ],