diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index 07b6da2a08..2fc5c5abd9 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -18,7 +18,7 @@ jobs: strategy: matrix: install-args: ['', '--prefer-lowest'] - php-version: ['8.1', '8.2', '8.3', '8.4'] + php-version: ['8.1', '8.2', '8.3', '8.4', '8.5'] fail-fast: false steps: diff --git a/phpstan.neon b/phpstan.neon index 11a355ed6b..47466309f5 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -39,3 +39,9 @@ parameters: path : src/Types/ID.php - identifier: missingType.generics + - + message: '#^Possibly invalid array key type string\|null\.$#' + path: src/FieldsBuilder.php + - + message: '#^Possibly invalid array key type string\|null\.$#' + path: src/Mappers/GlobTypeMapperCache.php diff --git a/src/Mappers/Root/IteratorTypeMapper.php b/src/Mappers/Root/IteratorTypeMapper.php index 767f0489f6..ae5881b5d0 100644 --- a/src/Mappers/Root/IteratorTypeMapper.php +++ b/src/Mappers/Root/IteratorTypeMapper.php @@ -229,7 +229,9 @@ private function splitIteratorFromOtherTypes(array &$types): Type|null } // One of the classes in the compound is an iterator. Let's remove it from the list and let's test all other values as potential subTypes. - unset($types[$key]); + if ($key !== null) { + unset($types[$key]); + } return $iteratorType; }