Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Closed
wants to merge 2 commits into from

Conversation

Tobion
Copy link
Contributor

@Tobion Tobion commented Jun 24, 2013

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.

@@ -135,7 +135,7 @@ class Response
*
* @api
*/
public function __construct($content = '', $status = 200, $headers = array())
public function __construct($content = '', $status = 200, array $headers = array())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must be reverted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Member

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.

@fabpot
Copy link
Member

fabpot commented Jul 2, 2013

cherry-picked the first commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants