Skip to content

Show previous exceptions during bootstrap - #8287

Open
jtattevin wants to merge 3 commits into
rectorphp:mainfrom
jtattevin:show-previous-exception
Open

Show previous exceptions during bootstrap#8287
jtattevin wants to merge 3 commits into
rectorphp:mainfrom
jtattevin:show-previous-exception

Conversation

@jtattevin

Copy link
Copy Markdown

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'."]}

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.

1 participant