Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4e02ed4

Browse filesBrowse files
committed
[BrowserKit] deprecated Response::buildHeader()
1 parent d0e8850 commit 4e02ed4
Copy full SHA for 4e02ed4

File tree

4 files changed

+9
-2
lines changed
Filter options

4 files changed

+9
-2
lines changed

‎UPGRADE-4.3.md

Copy file name to clipboardExpand all lines: UPGRADE-4.3.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ UPGRADE FROM 4.2 to 4.3
44
BrowserKit
55
----------
66

7+
* Deprecated `Response::buildHeader()`
78
* Deprecated `Response::getStatus()`, use `Response::getStatusCode()` instead
89

910
Config

‎UPGRADE-5.0.md

Copy file name to clipboardExpand all lines: UPGRADE-5.0.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ UPGRADE FROM 4.x to 5.0
44
BrowserKit
55
----------
66

7+
* Removed `Response::buildHeader()`
78
* Removed `Response::getStatus()`, use `Response::getStatusCode()` instead
89
* The `Client::submit()` method has a new `$serverParameters` argument.
910

‎src/Symfony/Component/BrowserKit/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/BrowserKit/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CHANGELOG
44
4.3.0
55
-----
66

7+
* Deprecated `Response::buildHeader()`
78
* Deprecated `Response::getStatus()`, use `Response::getStatusCode()` instead
89

910
4.2.0

‎src/Symfony/Component/BrowserKit/Response.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/BrowserKit/Response.php
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ public function __toString()
4545
$headers = '';
4646
foreach ($this->headers as $name => $value) {
4747
if (\is_string($value)) {
48-
$headers .= $this->buildHeader($name, $value);
48+
$headers .= sprintf("%s: %s\n", $name, $value);
4949
} else {
5050
foreach ($value as $headerValue) {
51-
$headers .= $this->buildHeader($name, $headerValue);
51+
$headers .= sprintf("%s: %s\n", $name, $headerValue);
5252
}
5353
}
5454
}
@@ -63,9 +63,13 @@ public function __toString()
6363
* @param string $value The header value
6464
*
6565
* @return string The built header line
66+
*
67+
* @deprecated since Symfony 4.3
6668
*/
6769
protected function buildHeader($name, $value)
6870
{
71+
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.3.', __METHOD__), E_USER_DEPRECATED);
72+
6973
return sprintf("%s: %s\n", $name, $value);
7074
}
7175

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.