Skip to content

Show previous exceptions during bootstrap - #8287

Merged
TomasVotruba merged 3 commits into
rectorphp:mainfrom
jtattevin:show-previous-exception
Aug 6, 2026
Merged

Show previous exceptions during bootstrap#8287
TomasVotruba merged 3 commits into
rectorphp:mainfrom
jtattevin:show-previous-exception

Conversation

@jtattevin

Copy link
Copy Markdown
Contributor

When an exception is displayed in the console, also output its previous exception when available.
This is especially helpful with PHPStan: if a configuration error occurs, you’ll see the underlying cause instead of only the top‑level failure.

Before :

[ERROR] Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory

or

{"fatal_errors":["Rector\\NodeTypeResolver\\DependencyInjection\\PHPStanServicesFactory"]}

After :

[ERROR] Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory

[ERROR] Unexpected item 'parameters › invalidParameters'.             

or

{"fatal_errors":["Rector\\NodeTypeResolver\\DependencyInjection\\PHPStanServicesFactory","Unexpected item 'parameters › invalidParameters'."]}

@TomasVotruba
TomasVotruba merged commit cc13c15 into rectorphp:main Aug 6, 2026
64 checks passed
@TomasVotruba

Copy link
Copy Markdown
Member

Looks very good, thank you for improvement 👍

@jtattevin
jtattevin deleted the show-previous-exception branch August 7, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants