Skip to content

Commit 091fe94

Browse files
committed
[0.6.x] Improve PHP 8.5+ support by replacing binary cast with string cast
This ports the changes from #115 to 0.6.x and buids up on #113 and 114.
1 parent 1721e2b commit 091fe94

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
- ubuntu-24.04
1515
- windows-2022
1616
php:
17+
- 8.5
1718
- 8.4
1819
- 8.3
1920
- 8.2

src/Process.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function __construct($cmd, $cwd = null, $env = null, $fds = null)
130130
if (null !== $env) {
131131
$this->env = array();
132132
foreach ($env as $key => $value) {
133-
$this->env[(binary) $key] = (binary) $value;
133+
$this->env[(string) $key] = (string) $value;
134134
}
135135
}
136136

tests/AbstractProcessTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ public function testStartWithoutLoopAssignsLoopAutomatically()
7070
$process->start();
7171

7272
$ref = new \ReflectionProperty($process->stdin, 'loop');
73-
$ref->setAccessible(true);
73+
if (PHP_VERSION_ID < 80100) {
74+
$ref->setAccessible(true);
75+
}
7476
$loop = $ref->getValue($process->stdin);
7577

7678
$this->assertInstanceOf('React\EventLoop\LoopInterface', $loop);

0 commit comments

Comments
 (0)