Fix baseline generation hiding its own error behind progress-bar output - #1060
Merged
staabm merged 1 commit intoSep 4, 2026
Merged
Conversation
…output
RexStan::generateAnalysisBaseline() and analyzeSummaryBaseline() (used
by the "ignore all" button on the analysis page and by the summary
page respectively) invoke PHPStan without --no-progress, unlike every
other PHPStan invocation in this file.
Depending on environment, PHPStan's progress-bar control characters
end up interleaved into the captured stderr output. On failure that
raw output is placed directly into the thrown exception's message
("Unable to generate baseline: <progress bar escape codes>"), making
the actual underlying error unreadable - encountered this while a
Nette container-cache directory had gone stale, where the real cause
("Unable to create file ...") was buried under garbled control
characters.
Both call sites now pass --no-progress, matching every other PHPStan
invocation already in this file.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
3 tasks
Member
|
Danke |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RexStan::generateAnalysisBaseline()(the "ignore all" button on the analysis page) andanalyzeSummaryBaseline()(the summary page) invoke PHPStan without--no-progress, unlike every other PHPStan invocation in this file.Depending on environment, PHPStan's progress-bar control characters end up interleaved into the captured stderr output. On failure that raw output lands directly in the thrown exception's message (
"Unable to generate baseline: <progress-bar escape codes>"), making the actual underlying error unreadable. I hit this myself: a stale Nette container-cache directory was the real cause ("Unable to create file ..."), but it was completely buried under garbled control characters until I added--no-progresslocally to see through it.Both call sites now pass
--no-progress, matching every other PHPStan invocation already in this file.This is a standalone bugfix, split out from a larger PR per review feedback (one PR per bug) — see #1059. Two follow-up PRs build on top of this one for the actual feature.
Test plan
--no-progressprevents the garbling regardless of the underlying cause.php -l+ PHPStan on the changed file: 0 findings.🤖 Generated with Claude Code