Skip to content

Commit

Permalink
Revert "Restore using php:// and socket:// streams with --log-events-…
Browse files Browse the repository at this point in the history
…text and --log-events-verbose-text"

This reverts commit 067790a.
  • Loading branch information
sebastianbergmann committed Feb 4, 2024
1 parent 5e2d16e commit 178bdd5
Showing 1 changed file with 18 additions and 27 deletions.
45 changes: 18 additions & 27 deletions src/TextUI/Configuration/Cli/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use function is_numeric;
use function realpath;
use function sprintf;
use function str_starts_with;
use PHPUnit\Runner\TestSuiteSorter;
use SebastianBergmann\CliParser\Exception as CliParserException;
use SebastianBergmann\CliParser\Parser as CliParser;
Expand Down Expand Up @@ -807,37 +806,29 @@ public function fromParameters(array $parameters): Configuration
break;

case '--log-events-text':
if (str_starts_with($option[1], 'php://') || str_starts_with($option[1], 'socket://')) {
$logEventsText = $option[1];
} else {
$logEventsText = realpath($option[1]);

if (!$logEventsText) {
throw new Exception(
sprintf(
'The path "%s" specified for the --log-events-text option could not be resolved',
$option[1],
),
);
}
$logEventsText = realpath($option[1]);

if (!$logEventsText) {
throw new Exception(
sprintf(
'The path "%s" specified for the --log-events-text option could not be resolved',
$option[1],
),
);
}

break;

case '--log-events-verbose-text':
if (str_starts_with($option[1], 'php://') || str_starts_with($option[1], 'socket://')) {
$logEventsVerboseText = $option[1];
} else {
$logEventsVerboseText = realpath($option[1]);

if (!$logEventsVerboseText) {
throw new Exception(
sprintf(
'The path "%s" specified for the --log-events-verbose-text option could not be resolved',
$option[1],
),
);
}
$logEventsVerboseText = realpath($option[1]);

if (!$logEventsVerboseText) {
throw new Exception(
sprintf(
'The path "%s" specified for the --log-events-verbose-text option could not be resolved',
$option[1],
),
);
}

break;
Expand Down

0 comments on commit 178bdd5

Please sign in to comment.