-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[WebProfiler] fix content-type parameter #8350
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
…presence in ResponseHeaderBag
@@ -135,7 +135,7 @@ class Response | |||
* | |||
* @api | |||
*/ | |||
public function __construct($content = '', $status = 200, $headers = array()) | |||
public function __construct($content = '', $status = 200, array $headers = array()) |
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.
This must be reverted.
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.
why?
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.
because this method is tagged with @api and because this change does not change anything and does not fix anything.
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.
So would you accept it for master?
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.
no
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.
And last but not the least, it is not even related to the other change you made.
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.
How it is breaking BC? And yes it is related because the bug would probably not have occured with this change because it would be obvious that you cannot pass a string where an array is expected.
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.
@fabpot It's not a real BC as it looks, php allows to change constructor behavior in extending classes, i.e.: http://3v4l.org/fB31K
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.
It's one of the only changes that is NO BC BREAK at all. Most other changes, even simply adding a protected method to a class, can be considered bc break. But this not.
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.
I'm not going to change my mind.
cherry-picked the first commit. |
Bc break: no
This fixes an error in #8050 that was raising a fatal error.
It also adds the typehint for consistency because the typehint is also present in ResponseHeaderBag where the param is passed through. This should help that such errors are more unlikely to happen.