Skip to content

Commit 6d71aea

Browse files
committed
Fix namespace for STDERR and add missing constants in BootstrapErrorHandler
1 parent 6985216 commit 6d71aea

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Prophecy/ErrorHandling/BootstrapErrorHandler.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
use Maduser\Argon\Prophecy\Contracts\ErrorHandling\BootstrapErrorHandlerInterface;
1010
use Psr\Log\LoggerInterface;
1111
use Throwable;
12+
use const E_ERROR;
13+
use const ENT_QUOTES;
14+
use const ENT_SUBSTITUTE;
15+
use const PHP_SAPI;
1216

1317
final class BootstrapErrorHandler implements BootstrapErrorHandlerInterface
1418
{
@@ -47,7 +51,7 @@ public function __construct(
4751
private function defaultOutputCallback(): Closure
4852
{
4953
return function (string $message): void {
50-
$stream = $this->stream ?? STDERR;
54+
$stream = $this->stream ?? \STDERR;
5155

5256
if ($this->sapi === 'cli') {
5357
fwrite($stream, $message);

0 commit comments

Comments
 (0)