[HttpKernel] added a setter for the headers property in the HttpException#17111
Closed
smatyas wants to merge 2 commits into
Closed
[HttpKernel] added a setter for the headers property in the HttpException#17111smatyas wants to merge 2 commits into
smatyas wants to merge 2 commits into
Conversation
529502d to
540c321
Compare
Member
|
I'm not sure it makes sense to tests all children classes of HttpException. I'd say only HttpExceptionTest is required here. If you really think it's worth, then I suggest using a data provider instead of duplicating the test cases for every type. |
540c321 to
c86ace0
Compare
Contributor
Author
|
I've reorganized the test classes to use the same data provider, and rebased my changes to the latest 2.8
|
Member
|
Thank you @smatyas. |
xabbuh
added a commit
to symfony/symfony-docs
that referenced
this pull request
Feb 7, 2016
…thod (smatyas) This PR was submitted for the 2.8 branch but it was merged into the master branch instead (closes #6076). Discussion ---------- added a sentence about the HttpException::setHeaders method | Q | A | ------------- | --- | Doc fix? | no | New docs? | yes symfony/symfony#17111 | Applies to | 2.8 | Fixed tickets | This PR is a doc. change related to the linked symfony PR. Commits ------- a5113cf added a sentence about the HttpException::setHeaders method
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Added this setter, because it's now impossible to use those handy, meaningful, already implemented exceptions (like NotFound...) if one wants to set some custom headers. This PR solves this problem.
It's a backward compatible solution in this way, but maybe it would be better if the
HttpExceptionInterfacewould contain thesetHeadersfunction as well. Of course this would be a BC break, that's why it is missing now.TODO: