Skip to content

Commit

Permalink
Merge branch '10.5' into 11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Mar 28, 2024
2 parents b7fda56 + 9f35e8a commit 097d217
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 33 deletions.
1 change: 1 addition & 0 deletions ChangeLog-11.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes of the PHPUnit 11.0 release series are documented in this fi
### Changed

* [#5766](https://github.com/sebastianbergmann/phpunit/pull/5766): Do not use a shell in `proc_open()` if not really needed
* [#5772](https://github.com/sebastianbergmann/phpunit/pull/5772): Cleanup process handling after dropping temp-file handling

### Fixed

Expand Down
4 changes: 0 additions & 4 deletions src/Util/PHP/AbstractPhpProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ abstract class AbstractPhpProcess

public static function factory(): self
{
if (PHP_OS_FAMILY === 'Windows') {
return new WindowsPhpProcess;
}

return new DefaultPhpProcess;
}

Expand Down
7 changes: 1 addition & 6 deletions src/Util/PHP/DefaultPhpProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class DefaultPhpProcess extends AbstractPhpProcess
*/
public function runJob(string $job, array $settings = []): array
{
if ($this->stdin || $this->useTemporaryFile()) {
if ($this->stdin) {
if (!($this->tempFile = tempnam(sys_get_temp_dir(), 'phpunit_')) ||
file_put_contents($this->tempFile, $job) === false) {
throw new PhpProcessException(
Expand Down Expand Up @@ -143,9 +143,4 @@ protected function cleanup(): void
unlink($this->tempFile);
}
}

protected function useTemporaryFile(): bool
{
return false;
}
}
23 changes: 0 additions & 23 deletions src/Util/PHP/WindowsPhpProcess.php

This file was deleted.

0 comments on commit 097d217

Please sign in to comment.