diff --git a/phpstan-baseline-7.4.neon b/phpstan-baseline-7.4.neon index e1f22cdf02..fe035ea4f4 100644 --- a/phpstan-baseline-7.4.neon +++ b/phpstan-baseline-7.4.neon @@ -269,3 +269,13 @@ parameters: message: "#^Parameter \\#2 \\$size of function array_chunk expects int\\<1, max\\>, int given\\.$#" count: 1 path: src/lib/UI/Module/ContentTree/NodeFactory.php + + - + message: "#^Parameter \\#1 \\$iterator of function iterator_to_array expects Traversable, iterable\\ given\\.$#" + count: 1 + path: src/lib/Siteaccess/SiteaccessResolver.php + + - + message: "#^Parameter \\#1 \\$iterator of function iterator_to_array expects Traversable, iterable\\ given\\.$#" + count: 1 + path: tests/lib/Form/Data/ContentTypeDataTest.php diff --git a/phpstan-baseline-8.3.neon b/phpstan-baseline-8.3.neon new file mode 100644 index 0000000000..aae1cb12bb --- /dev/null +++ b/phpstan-baseline-8.3.neon @@ -0,0 +1,211 @@ +parameters: + ignoreErrors: + - + message: "#^Parameter \\#1 \\$array of function array_shift expects array, iterable\\ given\\.$#" + count: 1 + path: src/bundle/Controller/Content/VersionDraftConflictController.php + + - + message: "#^Parameter \\#1 \\$array of function array_keys expects array, array\\|null given\\.$#" + count: 1 + path: src/bundle/Controller/ContentDraftController.php + + - + message: "#^Parameter \\#1 \\$array of function usort expects TArray of array\\, iterable\\ given\\.$#" + count: 1 + path: src/bundle/Controller/ContentTypeController.php + + - + message: "#^Parameter \\#1 \\$string1 of function strnatcasecmp expects string, string\\|null given\\.$#" + count: 1 + path: src/bundle/Controller/ContentTypeController.php + + - + message: "#^Parameter \\#2 \\$string2 of function strnatcasecmp expects string, string\\|null given\\.$#" + count: 1 + path: src/bundle/Controller/ContentTypeController.php + + - + message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, iterable\\ given\\.$#" + count: 1 + path: src/bundle/Controller/ContentTypeGroupController.php + + - + message: "#^Parameter \\#1 \\$array of function array_shift expects array, iterable\\ given\\.$#" + count: 1 + path: src/bundle/Controller/ContentViewController.php + + - + message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, iterable\\ given\\.$#" + count: 1 + path: src/bundle/Controller/ContentViewController.php + + - + message: "#^Parameter \\#1 \\$separator of function explode expects non\\-empty\\-string, string given\\.$#" + count: 1 + path: src/bundle/Templating/Twig/UniversalDiscoveryExtension.php + + - + message: "#^Parameter \\#1 \\$object of function date_format expects DateTimeInterface, DateTime\\|false given\\.$#" + count: 4 + path: src/lib/Behat/Component/Fields/DateAndTime.php + + - + message: "#^Parameter \\#1 \\$object of function date_format expects DateTimeInterface, DateTime\\|false given\\.$#" + count: 4 + path: src/lib/Behat/Component/Fields/Time.php + + - + message: "#^Parameter \\#2 \\$offset of function substr expects int, int\\<0, max\\>\\|false given\\.$#" + count: 1 + path: src/lib/Behat/Page/RolePage.php + + - + message: "#^Parameter \\#1 \\$array of function array_filter expects array, iterable\\ given\\.$#" + count: 1 + path: src/lib/EventListener/ContentProxyCreateDraftListener.php + + - + message: "#^Parameter \\#1 \\.\\.\\.\\$arrays of function array_merge expects array, array\\|null given\\.$#" + count: 1 + path: src/lib/Form/DataTransformer/FieldType/BinaryFileValueTransformer.php + + - + message: "#^Parameter \\#1 \\.\\.\\.\\$arrays of function array_merge expects array, array\\|null given\\.$#" + count: 1 + path: src/lib/Form/DataTransformer/FieldType/ImageAssetValueTransformer.php + + - + message: "#^Parameter \\#1 \\.\\.\\.\\$arrays of function array_merge expects array, array\\|null given\\.$#" + count: 1 + path: src/lib/Form/DataTransformer/FieldType/ImageValueTransformer.php + + - + message: "#^Parameter \\#1 \\.\\.\\.\\$arrays of function array_merge expects array, array\\|null given\\.$#" + count: 1 + path: src/lib/Form/DataTransformer/FieldType/MediaValueTransformer.php + + - + message: "#^Parameter \\#1 \\$array of function array_filter expects array, iterable\\ given\\.$#" + count: 1 + path: src/lib/Form/EventListener/AddLanguageFieldBasedOnContentListener.php + + - + message: "#^Parameter \\#1 \\$array of function array_filter expects array, iterable\\ given\\.$#" + count: 1 + path: src/lib/Form/Type/ChoiceList/Loader/AvailableTranslationLanguageChoiceLoader.php + + - + message: "#^Parameter \\#1 \\$array of function array_filter expects array, iterable\\ given\\.$#" + count: 1 + path: src/lib/Form/Type/ChoiceList/Loader/BaseTranslationLanguageChoiceLoader.php + + - + message: "#^Parameter \\#1 \\$array of function array_filter expects array, iterable\\ given\\.$#" + count: 2 + path: src/lib/Form/Type/ChoiceList/Loader/ContentEditTranslationChoiceLoader.php + + - + message: "#^Parameter \\#1 \\$array of function usort expects TArray of array\\, iterable\\ given\\.$#" + count: 1 + path: src/lib/Form/Type/ChoiceList/Loader/ContentTypeChoiceLoader.php + + - + message: "#^Parameter \\#1 \\$string1 of function strnatcasecmp expects string, string\\|null given\\.$#" + count: 1 + path: src/lib/Form/Type/ChoiceList/Loader/ContentTypeChoiceLoader.php + + - + message: "#^Parameter \\#2 \\$string2 of function strnatcasecmp expects string, string\\|null given\\.$#" + count: 1 + path: src/lib/Form/Type/ChoiceList/Loader/ContentTypeChoiceLoader.php + + - + message: "#^Parameter \\#1 \\$array of function array_filter expects array, iterable\\ given\\.$#" + count: 1 + path: src/lib/Form/Type/Content/Translation/TranslationAddType.php + + - + message: "#^Parameter \\#1 \\$array of function array_filter expects array, iterable\\ given\\.$#" + count: 1 + path: src/lib/Form/Type/ContentType/Translation/TranslationAddType.php + + - + message: "#^Parameter \\#1 \\$string of function strtolower expects string, string\\|null given\\.$#" + count: 1 + path: src/lib/Form/Type/FieldDefinition/User/PasswordConstraintCheckboxType.php + + - + message: "#^Parameter \\#1 \\$array of function array_filter expects array, iterable\\ given\\.$#" + count: 1 + path: src/lib/Form/Type/ObjectState/ContentObjectStateUpdateType.php + + - + message: "#^Parameter \\#1 \\$array of function array_filter expects array, iterable\\ given\\.$#" + count: 1 + path: src/lib/Pagination/Mapper/AbstractPagerContentToDataMapper.php + + - + message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, iterable\\ given\\.$#" + count: 1 + path: src/lib/Permission/PermissionChecker.php + + - + message: "#^Parameter \\#1 \\$array of function array_filter expects array, iterable\\ given\\.$#" + count: 1 + path: src/lib/Tab/Dashboard/PagerLocationToDataMapper.php + + - + message: "#^Parameter \\#1 \\$array of function array_filter expects array, iterable\\ given\\.$#" + count: 1 + path: src/lib/Tab/LocationView/ContentTab.php + + - + message: "#^Parameter \\#1 \\$string of function strtolower expects string, string\\|null given\\.$#" + count: 1 + path: src/lib/Translation/Extractor/PolicyTranslationExtractor.php + + - + message: "#^Parameter \\#1 \\$array of function usort expects TArray of array\\, iterable\\ given\\.$#" + count: 1 + path: src/lib/UI/Config/Provider/ContentTypes.php + + - + message: "#^Parameter \\#1 \\$string1 of function strnatcasecmp expects string, string\\|null given\\.$#" + count: 1 + path: src/lib/UI/Config/Provider/ContentTypes.php + + - + message: "#^Parameter \\#2 \\$string2 of function strnatcasecmp expects string, string\\|null given\\.$#" + count: 1 + path: src/lib/UI/Config/Provider/ContentTypes.php + + - + message: "#^Parameter \\#1 \\$array of function array_filter expects array, iterable\\ given\\.$#" + count: 1 + path: src/lib/UI/Dataset/ContentDraftsDataset.php + + - + message: "#^Parameter \\#2 \\$length of function array_chunk expects int\\<1, max\\>, int given\\.$#" + count: 1 + path: src/lib/UI/Module/ContentTree/NodeFactory.php + + - + message: "#^Deprecated in PHP 8\\.0\\: Required parameter \\$translator follows optional parameter \\$name\\.$#" + count: 1 + path: tests/lib/Tab/TabRegistryTest.php + + - + message: "#^Deprecated in PHP 8\\.0\\: Required parameter \\$twig follows optional parameter \\$name\\.$#" + count: 1 + path: tests/lib/Tab/TabRegistryTest.php + + - + message: "#^Parameter \\#1 \\$iterator of function iterator_to_array expects Traversable, iterable\\ given\\.$#" + count: 1 + path: src/lib/Siteaccess/SiteaccessResolver.php + + - + message: "#^Parameter \\#1 \\$iterator of function iterator_to_array expects Traversable, iterable\\ given\\.$#" + count: 1 + path: tests/lib/Form/Data/ContentTypeDataTest.php \ No newline at end of file diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index c340a9068c..6c0b4b0ad4 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -8615,11 +8615,6 @@ parameters: count: 1 path: src/lib/Siteaccess/SiteaccessResolver.php - - - message: "#^Parameter \\#1 \\$iterator of function iterator_to_array expects Traversable, iterable\\ given\\.$#" - count: 1 - path: src/lib/Siteaccess/SiteaccessResolver.php - - message: "#^Property Ibexa\\\\AdminUi\\\\Siteaccess\\\\SiteaccessResolver\\:\\:\\$siteAccessPreviewVoters \\(array\\\\) does not accept iterable\\.$#" count: 1 @@ -10906,11 +10901,6 @@ parameters: count: 1 path: tests/lib/Form/Data/ContentTranslationDataTest.php - - - message: "#^Parameter \\#1 \\$iterator of function iterator_to_array expects Traversable, iterable\\ given\\.$#" - count: 1 - path: tests/lib/Form/Data/ContentTypeDataTest.php - - message: "#^Method Ibexa\\\\Tests\\\\AdminUi\\\\Form\\\\Data\\\\FieldDefinitionDataTest\\:\\:testFieldDefinition\\(\\) has no return type specified\\.$#" count: 1 diff --git a/phpstan-baseline.neon.php b/phpstan-baseline.neon.php index d78e8e4366..da44dc862c 100644 --- a/phpstan-baseline.neon.php +++ b/phpstan-baseline.neon.php @@ -9,8 +9,10 @@ $includes = []; if (PHP_VERSION_ID < 80000) { $includes[] = __DIR__ . '/phpstan-baseline-7.4.neon'; -} else { +} elseif (PHP_VERSION_ID < 80300) { $includes[] = __DIR__ . '/phpstan-baseline-8.0.neon'; +} else { + $includes[] = __DIR__ . '/phpstan-baseline-8.3.neon'; } $config = [];