Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ErrorHandler][HttpKernel] Read SYMFONY_IDE to render exception in case of fatal error #45745

Merged
merged 1 commit into from Mar 17, 2022

Conversation

GromNaN
Copy link
Member

@GromNaN GromNaN commented Mar 15, 2022

Q A
Branch? 6.1
Bug fix? no
New feature? yes
Deprecations? no
Tickets -
License MIT
Doc PR -

In #44575, the env var SYMFONY_IDE is read when framework.ide is not set. This works to format links in most runtime exceptions. But fatal errors that occurs before application boot are not rendered using this config (ex: syntax error in service class).

Since the env var is globally available, it can be read even if it's not been injected.
The list of IDE formats have been duplicated from FileLinkFormatter.

The update of Symfony\Component\HttpKernel\Debug\FileLinkFormatter is not necessary for my use-case, but for exhaustivity.

@GromNaN GromNaN requested a review from yceruto as a code owner March 15, 2022 12:03
@carsonbot carsonbot added this to the 6.1 milestone Mar 15, 2022
@carsonbot carsonbot changed the title [ErrorHandler] Read SYMFONY_IDE to render exception in case of fatal error [ErrorHandler][HttpKernel] Read SYMFONY_IDE to render exception in case of fatal error Mar 15, 2022
@carsonbot
Copy link

Hey!

I think @PhilETaylor has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

@PhilETaylor
Copy link
Contributor

I think @PhilETaylor has recently worked with this code. Maybe they can help review this?

Sorry, nothing to add here. My changes were in HtmlRenderer to render a custom template 2 years ago 6e1d16b and not related to framework.ide :) :) Although I use the framework.ide links daily so happy to test this PR.

@GromNaN GromNaN merged commit 912ceb7 into symfony:6.1 Mar 17, 2022
@GromNaN GromNaN deleted the symfony-ide-fatal branch March 17, 2022 19:01
@fabpot fabpot mentioned this pull request Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants