Skip to content

Commit

Permalink
PHP8.3 compatibility #2 (#20)
Browse files Browse the repository at this point in the history
* PHP8.3 compatibility

Turns out PHP<8.3's proc_open does not really care if the requested working_dir does not exist, while PHP>=8.3's proc_open bails if it does not exist.

And due to a typo in the code, the dir never existed.

And due to insufficient error checking, the error was not really detected.

Took fking 4 hours to track down, and the fix is 1 byte. divinity76#1

Should probably complain to the php-src bugtracker, i am guessing the proc_open behavior change was unintentional

* StyleCI
  • Loading branch information
divinity76 authored Mar 17, 2024
1 parent 3913bd8 commit 3f4b1f7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/Test/ServerTestHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,11 @@ public function setUp(): void
2 => ['file', $directory.'/server.err.log', 'a+'],
],
$this->pipes,
__DIR__.'../'
__DIR__.'/../'
);

if (false === $this->process) {
throw new \RuntimeException('proc_open failed: '.\var_export(\error_get_last(), true));
}
\sleep(3);
}

Expand Down

0 comments on commit 3f4b1f7

Please sign in to comment.