Skip to content

Commit 8f461db

Browse files
authored
Merge pull request #32 from bartvanhoutte/master
Support PHP 8.1, avoid deprecation warning concerning \Countable::count(...) return type.
2 parents 2eaddc5 + 2fdb338 commit 8f461db

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
php:
14+
- 8.1
1415
- 8.0
1516
- 7.4
1617
- 7.3

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)