diff --git a/phpstan-baseline-7.4.neon b/phpstan-baseline-7.4.neon index 5e91304dbf..77a0351af0 100644 --- a/phpstan-baseline-7.4.neon +++ b/phpstan-baseline-7.4.neon @@ -25,21 +25,6 @@ parameters: count: 1 path: src/bundle/Core/Command/CleanupVersionsCommand.php - - - message: "#^Parameter \\#1 \\$fp of function fclose expects resource, resource\\|false given\\.$#" - count: 1 - path: src/bundle/Core/Command/ResizeOriginalImagesCommand.php - - - - message: "#^Parameter \\#1 \\$fp of function fwrite expects resource, resource\\|false given\\.$#" - count: 1 - path: src/bundle/Core/Command/ResizeOriginalImagesCommand.php - - - - message: "#^Parameter \\#1 \\$fp of function stream_get_meta_data expects resource, resource\\|false given\\.$#" - count: 1 - path: src/bundle/Core/Command/ResizeOriginalImagesCommand.php - - message: "#^Parameter \\#2 \\$str of function fwrite expects string, string\\|false given\\.$#" count: 1 @@ -95,36 +80,11 @@ parameters: count: 1 path: src/bundle/Core/Imagine/Cache/AliasGeneratorDecorator.php - - - message: "#^Parameter \\#1 \\$fp of function fclose expects resource, resource\\|false given\\.$#" - count: 1 - path: src/bundle/Core/Imagine/IORepositoryResolver.php - - - - message: "#^Parameter \\#1 \\$fp of function fwrite expects resource, resource\\|false given\\.$#" - count: 1 - path: src/bundle/Core/Imagine/IORepositoryResolver.php - - - - message: "#^Parameter \\#1 \\$fp of function stream_get_meta_data expects resource, resource\\|false given\\.$#" - count: 1 - path: src/bundle/Core/Imagine/IORepositoryResolver.php - - message: "#^Parameter \\#2 \\$str of function fwrite expects string, string\\|false given\\.$#" count: 1 path: src/bundle/Core/Imagine/IORepositoryResolver.php - - - message: "#^Parameter \\#1 \\$fp of function stream_get_meta_data expects resource, resource\\|false given\\.$#" - count: 1 - path: src/bundle/Core/Imagine/PlaceholderProvider/GenericProvider.php - - - - message: "#^Parameter \\#1 \\$fp of function stream_get_meta_data expects resource, resource\\|false given\\.$#" - count: 1 - path: src/bundle/Core/Imagine/PlaceholderProvider/RemoteProvider.php - - message: "#^Parameter \\#1 \\$fp of function fclose expects resource, resource\\|false given\\.$#" count: 1 @@ -490,11 +450,6 @@ parameters: count: 1 path: tests/integration/Core/Repository/Values/User/Limitation/BaseLimitationTest.php - - - message: "#^Parameter \\#1 \\$fp of function fclose expects resource, resource\\|false given\\.$#" - count: 1 - path: tests/lib/IO/Flysystem/Adapter/DynamicPathFilesystemAdapterDecoratorTest.php - - message: "#^Parameter \\#1 \\$str of function md5 expects string, float given\\.$#" count: 1 diff --git a/phpstan-baseline-gte-8.0.neon b/phpstan-baseline-gte-8.0.neon index 3f17ddcbc5..c3cde9014c 100644 --- a/phpstan-baseline-gte-8.0.neon +++ b/phpstan-baseline-gte-8.0.neon @@ -25,21 +25,6 @@ parameters: count: 1 path: src/bundle/Core/Command/CleanupVersionsCommand.php - - - message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#" - count: 1 - path: src/bundle/Core/Command/ResizeOriginalImagesCommand.php - - - - message: "#^Parameter \\#1 \\$stream of function fwrite expects resource, resource\\|false given\\.$#" - count: 1 - path: src/bundle/Core/Command/ResizeOriginalImagesCommand.php - - - - message: "#^Parameter \\#1 \\$stream of function stream_get_meta_data expects resource, resource\\|false given\\.$#" - count: 1 - path: src/bundle/Core/Command/ResizeOriginalImagesCommand.php - - message: "#^Parameter \\#2 \\$data of function fwrite expects string, string\\|false given\\.$#" count: 1 @@ -80,36 +65,11 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/UserContext.php - - - message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#" - count: 1 - path: src/bundle/Core/Imagine/IORepositoryResolver.php - - - - message: "#^Parameter \\#1 \\$stream of function fwrite expects resource, resource\\|false given\\.$#" - count: 1 - path: src/bundle/Core/Imagine/IORepositoryResolver.php - - - - message: "#^Parameter \\#1 \\$stream of function stream_get_meta_data expects resource, resource\\|false given\\.$#" - count: 1 - path: src/bundle/Core/Imagine/IORepositoryResolver.php - - message: "#^Parameter \\#2 \\$data of function fwrite expects string, string\\|false given\\.$#" count: 1 path: src/bundle/Core/Imagine/IORepositoryResolver.php - - - message: "#^Parameter \\#1 \\$stream of function stream_get_meta_data expects resource, resource\\|false given\\.$#" - count: 1 - path: src/bundle/Core/Imagine/PlaceholderProvider/GenericProvider.php - - - - message: "#^Parameter \\#1 \\$stream of function stream_get_meta_data expects resource, resource\\|false given\\.$#" - count: 1 - path: src/bundle/Core/Imagine/PlaceholderProvider/RemoteProvider.php - - message: "#^Method Ibexa\\\\Bundle\\\\Core\\\\URLChecker\\\\Handler\\\\HTTPHandler\\:\\:createCurlHandlerForUrl\\(\\) should return resource but returns CurlHandle\\.$#" count: 1 @@ -455,11 +415,6 @@ parameters: count: 1 path: tests/integration/Core/Repository/Values/User/Limitation/BaseLimitationTest.php - - - message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#" - count: 1 - path: tests/lib/IO/Flysystem/Adapter/DynamicPathFilesystemAdapterDecoratorTest.php - - message: "#^Parameter \\#1 \\$string of function md5 expects string, float given\\.$#" count: 1 diff --git a/phpstan-baseline-lte-8.2.neon b/phpstan-baseline-lte-8.2.neon index 7831745c64..af2834b3c0 100644 --- a/phpstan-baseline-lte-8.2.neon +++ b/phpstan-baseline-lte-8.2.neon @@ -3,19 +3,19 @@ parameters: - message: "#^Offset 'uri' does not exist on array\\{timed_out\\: bool, blocked\\: bool, eof\\: bool, unread_bytes\\: int, stream_type\\: string, wrapper_type\\: string, wrapper_data\\: mixed, mode\\: string, \\.\\.\\.\\}\\.$#" count: 1 - path: src/bundle/Core/Imagine/IORepositoryResolver.php + path: src/bundle/Core/Command/ResizeOriginalImagesCommand.php - message: "#^Offset 'uri' does not exist on array\\{timed_out\\: bool, blocked\\: bool, eof\\: bool, unread_bytes\\: int, stream_type\\: string, wrapper_type\\: string, wrapper_data\\: mixed, mode\\: string, \\.\\.\\.\\}\\.$#" count: 1 - path: src/bundle/Core/Imagine/PlaceholderProvider/GenericProvider.php + path: src/bundle/Core/Imagine/IORepositoryResolver.php - message: "#^Offset 'uri' does not exist on array\\{timed_out\\: bool, blocked\\: bool, eof\\: bool, unread_bytes\\: int, stream_type\\: string, wrapper_type\\: string, wrapper_data\\: mixed, mode\\: string, \\.\\.\\.\\}\\.$#" count: 1 - path: src/bundle/Core/Imagine/PlaceholderProvider/RemoteProvider.php + path: src/bundle/Core/Imagine/PlaceholderProvider/GenericProvider.php - message: "#^Offset 'uri' does not exist on array\\{timed_out\\: bool, blocked\\: bool, eof\\: bool, unread_bytes\\: int, stream_type\\: string, wrapper_type\\: string, wrapper_data\\: mixed, mode\\: string, \\.\\.\\.\\}\\.$#" count: 1 - path: src/bundle/Core/Command/ResizeOriginalImagesCommand.php + path: src/bundle/Core/Imagine/PlaceholderProvider/RemoteProvider.php diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 6f22de7e46..d73ef20c1e 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -7640,11 +7640,6 @@ parameters: count: 1 path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - - message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Test\\\\Repository\\\\SetupFactory\\\\Legacy\\:\\:createTemporaryDirectory\\(\\) should return string but returns string\\|false\\.$#" - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Test\\\\Repository\\\\SetupFactory\\\\Legacy\\:\\:externalBuildContainer\\(\\) has no return type specified\\.$#" count: 1 @@ -7670,16 +7665,6 @@ parameters: count: 1 path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - - message: "#^Parameter \\#1 \\$dirs of method Symfony\\\\Component\\\\Filesystem\\\\Filesystem\\:\\:mkdir\\(\\) expects iterable\\|string, string\\|false given\\.$#" - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - - - message: "#^Parameter \\#1 \\$filename of function unlink expects string, string\\|false given\\.$#" - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - message: "#^Property Ibexa\\\\Contracts\\\\Core\\\\Test\\\\Repository\\\\SetupFactory\\\\Legacy\\:\\:\\$connection \\(Doctrine\\\\DBAL\\\\Connection\\) does not accept object\\.$#" count: 1 @@ -44695,11 +44680,6 @@ parameters: count: 1 path: tests/lib/IO/FilePathNormalizer/FlysystemTest.php - - - message: "#^Parameter \\#2 \\$contents of method League\\\\Flysystem\\\\FilesystemAdapter\\:\\:writeStream\\(\\) expects resource, resource\\|false given\\.$#" - count: 1 - path: tests/lib/IO/Flysystem/Adapter/DynamicPathFilesystemAdapterDecoratorTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\IO\\\\Flysystem\\\\VisibilityConverter\\\\BaseVisibilityConverterTest\\:\\:getDataForTestForDirectory\\(\\) return type has no value type specified in iterable type iterable\\.$#" count: 1 diff --git a/src/contracts/Repository/LocationService.php b/src/contracts/Repository/LocationService.php index d576359335..0095fefda4 100644 --- a/src/contracts/Repository/LocationService.php +++ b/src/contracts/Repository/LocationService.php @@ -97,6 +97,10 @@ public function loadLocations(ContentInfo $contentInfo, ?Location $rootLocation /** * Loads children which are readable by the current user of a location object sorted by sortField and sortOrder. * + * Use this method with caution. It performs heavy queries on the database. + * Consider using {@see \eZ\Publish\API\Repository\SearchService::findLocations()} with + * {@see \eZ\Publish\Core\QueryType\BuiltIn\ChildrenQueryType} as an alternative. + * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Location $location * @param int $offset the start offset for paging * @param int $limit the number of locations returned