-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DependencyInjection] forward the parse error to the calling code #29928
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thank you.
We could implement an analogical change in XMLFileLoader, for users, who configure services using XML: symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php Lines 381 to 392 in b972d15
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you do the same for the XML loader?
done |
Thank you @xabbuh. |
…ling code (xabbuh) This PR was merged into the 3.4 branch. Discussion ---------- [DependencyInjection] forward the parse error to the calling code | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #29891 | License | MIT | Doc PR | This change does not fully solve the linked issue, but improves the exception a bit by providing a bit more context. The error page will no start like this:  Commits ------- c5c2d31 forward the parse error to the calling code
This PR was merged into the 3.4 branch. Discussion ---------- [DependencyInjection] fix tests | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #29928 | License | MIT | Doc PR | My changes in #29928 broke the test suite. Commits ------- 4db0a6e fix tests
…of Debug (javiereguiluz) This PR was squashed before being merged into the 4.3-dev branch (closes #30024). Discussion ---------- [Debug] Display more details in the simple error page of Debug | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #29891 | License | MIT | Doc PR | - Note: this only changes the simple error page of Debug component, which is different from the full-featured error page of WebProfilerBundle. ----- #29891 shows a confusing error page. In #29928 we improved the first error message displayed to the user. In this PR we implement @nicolas-grekas' idea to replace the generic error page title by a better error message. So, this PR + #29928 would fix #29891 to me. ### Before  ### After  Commits ------- 75ff151 [Debug] Display more details in the simple error page of Debug
This change does not fully solve the linked issue, but improves the exception a bit by providing a bit more context.
The error page will no start like this: