From 679682c186ee99c98fe795721b5e620e03d96d6b Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Tue, 10 Jan 2023 18:20:31 +0100 Subject: Use a Generator for job list to fix background-job:list command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- lib/public/BackgroundJob/IJobList.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/public') diff --git a/lib/public/BackgroundJob/IJobList.php b/lib/public/BackgroundJob/IJobList.php index 8f6449b070b..bd43f0771f6 100644 --- a/lib/public/BackgroundJob/IJobList.php +++ b/lib/public/BackgroundJob/IJobList.php @@ -78,21 +78,21 @@ interface IJobList { /** * get all jobs in the list * - * @return IJob[] + * @return iterable * @since 7.0.0 * @deprecated 9.0.0 - This method is dangerous since it can cause load and * memory problems when creating too many instances. Use getJobs instead. */ - public function getAll(): array; + public function getAll(): iterable; /** * Get jobs matching the search * * @param IJob|class-string|null $job - * @return IJob[] + * @return iterable * @since 25.0.0 */ - public function getJobs($job, ?int $limit, int $offset): array; + public function getJobs($job, ?int $limit, int $offset): iterable; /** * get the next job in the list -- cgit v1.2.3