[WebProfiler] Can't consult the exception panel when there is an exception #8441
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.
When consulting the Exception Panel of the Web Profiler, there was an exception stating that the ResponseHeaderBag expects an array as a typehint, and it has a string instead
This was induced in the commit 6d2135b.
The thing is, as I already discussed on IRC with @lsmith77, I think it is strange that the
Response
's constructor does not have a typehint on the$headers
parameter, as it is directly fed to theResponseHeaderBag
, on the very first instruction of the mentionned controller, which provokes the mentionned error. So either we can add the typehint on the Response, or we can also typehint the parameter :Though I think it is not as neat as the typehint directly on the parameter, but I heard that it was a no-go to add a typehint on object's constructor, as this could be a potential BC Break. Is it still the case ? Even though this call are here for at least 2 years now...
Cheers.