From d74044f6341e93861d820f21b6d37a2f98e1ef60 Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Thu, 12 Jan 2023 17:18:59 +0100 Subject: Fix API breakage by using a new method instead 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 | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'lib/public/BackgroundJob') diff --git a/lib/public/BackgroundJob/IJobList.php b/lib/public/BackgroundJob/IJobList.php index 0b32607feb6..e8d0380e604 100644 --- a/lib/public/BackgroundJob/IJobList.php +++ b/lib/public/BackgroundJob/IJobList.php @@ -79,10 +79,20 @@ interface IJobList { * Get jobs matching the search * * @param IJob|class-string|null $job - * @return iterable + * @return array * @since 25.0.0 + * @deprecated 26.0.0 Use getJobsIterator instead to avoid duplicated job objects + */ + public function getJobs($job, ?int $limit, int $offset): array; + + /** + * Get jobs matching the search + * + * @param IJob|class-string|null $job + * @return iterable + * @since 26.0.0 */ - public function getJobs($job, ?int $limit, int $offset): iterable; + public function getJobsIterator($job, ?int $limit, int $offset): iterable; /** * get the next job in the list -- cgit v1.2.3