Skip to content

Commit 87e8c86

Browse files
committed
Fixed PHP 8.1 deprecation concerning \Countable::count(...) return type.
1 parent 2eaddc5 commit 87e8c86

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

phpunit.xml.dist

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
66
bootstrap="vendor/autoload.php"
77
colors="true"
8-
cacheResult="false">
8+
cacheResult="false"
9+
convertDeprecationsToExceptions="true">
910
<testsuites>
1011
<testsuite name="MQ React Test Suite">
1112
<directory>./tests/</directory>

phpunit.xml.legacy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.8/phpunit.xsd"
66
bootstrap="vendor/autoload.php"
7-
colors="true">
7+
colors="true"
8+
convertDeprecationsToExceptions="true">
89
<testsuites>
910
<testsuite name="MQ React Test Suite">
1011
<directory>./tests/</directory>

src/Queue.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ public function __invoke()
387387
return $deferred->promise();
388388
}
389389

390+
#[\ReturnTypeWillChange]
390391
public function count()
391392
{
392393
return $this->pending + count($this->queue);

0 commit comments

Comments
 (0)