{"record":{"id":"3146043a948abcf4","repo":"sebastianbergmann/phpunit","slug":"the-path-s-specified-for-the-log-events-verbo","errorCode":null,"errorMessage":"The path \"%s\" specified for the --log-events-verbose-text option could not be resolved","messagePattern":"The path \"(.+?)\" specified for the --log-events-verbose-text option could not be resolved","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/TextUI/Configuration/Cli/Builder.php","lineNumber":1407,"sourceCode":"                    $logEventsText     = Filesystem::resolveStreamOrFile($logEventsTextPath);\n\n                    if ($logEventsText === false) {\n                        throw new Exception(\n                            sprintf(\n                                'The path \"%s\" specified for the --log-events-text option could not be resolved',\n                                $logEventsTextPath,\n                            ),\n                        );\n                    }\n\n                    break;\n\n                case '--log-events-verbose-text':\n                    $logEventsVerboseTextPath = $this->requireNonEmptyValue($option[1], '--log-events-verbose-text');\n                    $logEventsVerboseText     = Filesystem::resolveStreamOrFile($logEventsVerboseTextPath);\n\n                    if ($logEventsVerboseText === false) {\n                        throw new Exception(\n                            sprintf(\n                                'The path \"%s\" specified for the --log-events-verbose-text option could not be resolved',\n                                $logEventsVerboseTextPath,\n                            ),\n                        );\n                    }\n\n                    break;\n\n                case '--debug':\n                    $debug = true;\n\n                    break;\n\n                case '--with-telemetry':\n                    $withTelemetry = true;\n\n                    break;","sourceCodeStart":1389,"sourceCodeEnd":1425,"githubUrl":"https://github.com/sebastianbergmann/phpunit/blob/f123cdb2a2d49f15025794166cfed8bda8627dd2/src/TextUI/Configuration/Cli/Builder.php#L1389-L1425","documentation":"Same guard as for --log-events-text, but for --log-events-verbose-text, which enables the verbose test-runner event log (events plus payload data). Filesystem::resolveStreamOrFile() returns false when the value is not a php:// or socket:// stream and its parent directory does not exist, so PHPUnit aborts configuration building before the run starts.","triggerScenarios":"`vendor/bin/phpunit --log-events-verbose-text=.ci/events-verbose.txt` where `.ci/` does not exist; a relative path evaluated from a working directory in which the parent directory is missing; typo'd directory component in the path. Stream targets (`php://stdout`, `socket://host:port`) bypass the directory check.","commonSituations":"Verbose event logging enabled for debugging in CI where the output directory is created by a later or skipped step; local scripts run from a different cwd after a project restructure; directory name typos (e.g. `.build` vs `build`).","solutions":["Create the parent directory first: `mkdir -p .ci && vendor/bin/phpunit --log-events-verbose-text=.ci/events-verbose.txt`","Point at an existing directory (absolute path preferred in CI)","Use a stream target like `php://stderr` for temporary debugging sessions","Pre-validate from PHP: `is_dir(dirname($path)) || mkdir(dirname($path), 0777, true);` before invoking PHPUnit"],"exampleFix":"# before\nvendor/bin/phpunit --log-events-verbose-text=.ci/events.txt   # .ci/ missing\n\n# after\nmkdir -p .ci\nvendor/bin/phpunit --log-events-verbose-text=.ci/events.txt","handlingStrategy":"validation","validationCode":"use function str_starts_with;\n\nfunction verboseEventLogTargetResolves(string $path): bool\n{\n    return str_starts_with($path, 'php://')\n        || str_starts_with($path, 'socket://')\n        || is_dir(dirname($path));\n}\n\n$path = '.ci/events-verbose.txt';\n\nif (!verboseEventLogTargetResolves($path)) {\n    mkdir(dirname($path), 0777, true);\n}","typeGuard":null,"tryCatchPattern":"try {\n    $cliConfig = (new \\PHPUnit\\TextUI\\CliArguments\\Builder)->fromParameters($argv);\n} catch (\\PHPUnit\\TextUI\\CliArguments\\Exception $e) {\n    // covers unresolvable --log-events-verbose-text paths\n    fwrite(STDERR, $e->getMessage() . PHP_EOL);\n    exit(1);\n}","preventionTips":["Enable verbose event logging only when the target directory is guaranteed to exist (CI setup step)","Treat this option like any file output: check the parent directory before the run","Use a stream target during debugging sessions to avoid filesystem dependencies"],"tags":["phpunit","cli","logging","event-log","verbose","path-resolution"],"backgroundTag":"unresolvable-output-path","analyzedSha":"f123cdb2a2d49f15025794166cfed8bda8627dd2","analyzedAt":"2026-08-23T01:20:58.058Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}