Skip to content

Commit 607d902

Browse files
nicolas-grekasfabpot
authored andcommitted
Bump minimum version of PHP to 8.1
1 parent 8bf34f2 commit 607d902

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

Tests/Transport/FailoverTransportTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,9 @@ public function testSendOneDeadButRecover()
157157
private function assertTransports(RoundRobinTransport $transport, int $cursor, array $deadTransports)
158158
{
159159
$p = new \ReflectionProperty(RoundRobinTransport::class, 'cursor');
160-
$p->setAccessible(true);
161160
$this->assertSame($cursor, $p->getValue($transport));
162161

163162
$p = new \ReflectionProperty(RoundRobinTransport::class, 'deadTransports');
164-
$p->setAccessible(true);
165163
$this->assertSame($deadTransports, iterator_to_array($p->getValue($transport)));
166164
}
167165
}

Tests/Transport/RoundRobinTransportTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ public function testSendOneDead()
7474
$t2->expects($this->exactly(3))->method('send');
7575
$t = new RoundRobinTransport([$t1, $t2]);
7676
$p = new \ReflectionProperty($t, 'cursor');
77-
$p->setAccessible(true);
7877
$p->setValue($t, 0);
7978
$t->send(new RawMessage(''));
8079
$this->assertTransports($t, 0, [$t1]);
@@ -92,7 +91,6 @@ public function testSendOneDeadAndRecoveryNotWithinRetryPeriod()
9291
$t2->expects($this->once())->method('send')->will($this->throwException(new TransportException()));
9392
$t = new RoundRobinTransport([$t1, $t2], 60);
9493
$p = new \ReflectionProperty($t, 'cursor');
95-
$p->setAccessible(true);
9694
$p->setValue($t, 0);
9795
$t->send(new RawMessage(''));
9896
$this->assertTransports($t, 1, []);
@@ -114,7 +112,6 @@ public function testSendOneDeadAndRecoveryWithinRetryPeriod()
114112
->willReturnOnConsecutiveCalls($this->throwException(new TransportException()));
115113
$t = new RoundRobinTransport([$t1, $t2], 3);
116114
$p = new \ReflectionProperty($t, 'cursor');
117-
$p->setAccessible(true);
118115
$p->setValue($t, 0);
119116
$t->send(new RawMessage(''));
120117
$this->assertTransports($t, 1, []);
@@ -130,14 +127,12 @@ public function testSendOneDeadAndRecoveryWithinRetryPeriod()
130127
private function assertTransports(RoundRobinTransport $transport, int $cursor, array $deadTransports)
131128
{
132129
$p = new \ReflectionProperty($transport, 'cursor');
133-
$p->setAccessible(true);
134130
if (-1 !== $cursor) {
135131
$this->assertSame($cursor, $p->getValue($transport));
136132
}
137133
$cursor = $p->getValue($transport);
138134

139135
$p = new \ReflectionProperty($transport, 'deadTransports');
140-
$p->setAccessible(true);
141136
$this->assertSame($deadTransports, iterator_to_array($p->getValue($transport)));
142137

143138
return $cursor;

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=8.0.2",
19+
"php": ">=8.1",
2020
"egulias/email-validator": "^2.1.10|^3",
2121
"psr/event-dispatcher": "^1",
2222
"psr/log": "^1|^2|^3",

0 commit comments

Comments
 (0)