From 900c81c9f39156223cb71fb9a6498a7733dca453 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Tue, 7 Mar 2023 11:52:42 +0100 Subject: [PATCH 1/2] Fixed compatibility with doctrine/collections:^2 --- src/Queue/TestsQueue.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Queue/TestsQueue.php b/src/Queue/TestsQueue.php index 302eebb..3e3a211 100644 --- a/src/Queue/TestsQueue.php +++ b/src/Queue/TestsQueue.php @@ -53,7 +53,9 @@ public function add($value): bool $value = new TestSuite($value); } - return parent::add($value); + parent::add($value); + + return true; } /** From 437f4ec0c63e0fc5af14ea9995478f7718cbad36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Tue, 7 Mar 2023 11:53:09 +0100 Subject: [PATCH 2/2] Added deprecation notice for TestsQueue::add --- composer.json | 3 ++- src/Queue/TestsQueue.php | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5c8ed2e..ccae4ed 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,8 @@ "symfony/console": "^4.4|^5.0|^6.0", "symfony/stopwatch": "^4.4|^5.0|^6.0", "symfony/process": "^4.4.35|^5.0|^6.0", - "doctrine/collections": "^1.2|^2.0" + "doctrine/collections": "^1.2|^2.0", + "symfony/deprecation-contracts": "^2.1|^3" }, "require-dev": { "behat/behat": "^3.6", diff --git a/src/Queue/TestsQueue.php b/src/Queue/TestsQueue.php index 3e3a211..3af3e41 100644 --- a/src/Queue/TestsQueue.php +++ b/src/Queue/TestsQueue.php @@ -54,6 +54,12 @@ public function add($value): bool } parent::add($value); + + trigger_deprecation( + 'liuggio/fastest', + '1.10', + 'The return value of Liuggio\Fastest\Queue\TestsQueue:add will change to void in v2 of the package' + ); return true; }