Skip to content

Commit 51e0bee

Browse files
staabmsebastianbergmann
authored andcommitted
Cleanup process handling after dropping temp-file handling
1 parent 500149c commit 51e0bee

File tree

3 files changed

+1
-33
lines changed

3 files changed

+1
-33
lines changed

src/Util/PHP/AbstractPhpProcess.php

-4
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ abstract class AbstractPhpProcess
5353

5454
public static function factory(): self
5555
{
56-
if (PHP_OS_FAMILY === 'Windows') {
57-
return new WindowsPhpProcess;
58-
}
59-
6056
return new DefaultPhpProcess;
6157
}
6258

src/Util/PHP/DefaultPhpProcess.php

+1-6
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class DefaultPhpProcess extends AbstractPhpProcess
4040
*/
4141
public function runJob(string $job, array $settings = []): array
4242
{
43-
if ($this->stdin || $this->useTemporaryFile()) {
43+
if ($this->stdin) {
4444
if (!($this->tempFile = tempnam(sys_get_temp_dir(), 'phpunit_')) ||
4545
file_put_contents($this->tempFile, $job) === false) {
4646
throw new PhpProcessException(
@@ -143,9 +143,4 @@ protected function cleanup(): void
143143
unlink($this->tempFile);
144144
}
145145
}
146-
147-
protected function useTemporaryFile(): bool
148-
{
149-
return false;
150-
}
151146
}

src/Util/PHP/WindowsPhpProcess.php

-23
This file was deleted.

0 commit comments

Comments
 (0)