Skip to content

Commit 4b8749f

Browse files
authored
Merge branch 'main' into dependabot/github_actions/actions/download-artifact-4.3.0
2 parents df7a7f1 + db54f7b commit 4b8749f

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/CodeCleaner/ImplicitReturnPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ private function addImplicitReturn(array $nodes): array
8080
'startLine' => $last->getStartLine(),
8181
'endLine' => $last->getEndLine(),
8282
]);
83-
// @codeCoverageIgnoreEnd
83+
// @codeCoverageIgnoreEnd
8484
} elseif ($last instanceof Expression && !($last->expr instanceof Exit_)) {
8585
$nodes[\count($nodes) - 1] = new Return_($last->expr, [
8686
'startLine' => $last->getStartLine(),

src/Output/ProcOutputPager.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,13 @@ public function doWrite($message, $newline): void
5656
$pipe = $this->getPipe();
5757
if (false === @\fwrite($pipe, $message.($newline ? \PHP_EOL : ''))) {
5858
// @codeCoverageIgnoreStart
59-
// should never happen
59+
// When the message is sufficiently long, writing to the pipe fails
60+
// if the pager process is closed before the entire message is read.
61+
//
62+
// This is a normal condition, so we just close the pipe and return.
6063
$this->close();
61-
throw new \RuntimeException('Unable to write output');
64+
65+
return;
6266
// @codeCoverageIgnoreEnd
6367
}
6468

test/fixtures/config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111

1212
if (!isset($config)) {
13-
throw new \Exception('$config not found');
13+
throw new Exception('$config not found');
1414
}
1515

1616
$config->setRuntimeDir(\sys_get_temp_dir().'/psysh_test/withconfig/temp');

0 commit comments

Comments
 (0)