Skip to content

Commit 495ffa2

Browse files
Merge branch '6.3' into 6.4
* 6.3: minor #53524 [Messenger] [AmazonSqs] Allow `async-aws/sqs` version 2 (smoench) Fix bad merge List CS fix in .git-blame-ignore-revs Fix implicitly-required parameters List CS fix in .git-blame-ignore-revs Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
2 parents a3bb210 + 867868f commit 495ffa2

10 files changed

Lines changed: 16 additions & 16 deletions

‎AbstractBrowser.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ abstract class AbstractBrowser
5454
/**
5555
* @param array $server The server parameters (equivalent of $_SERVER)
5656
*/
57-
publicfunction__construct(array$server = [], History$history = null, CookieJar$cookieJar = null)
57+
publicfunction__construct(array$server = [], ?History$history = null, ?CookieJar$cookieJar = null)
5858
{
5959
$this->setServerParameters($server);
6060
$this->history = $history ?? newHistory();
@@ -154,7 +154,7 @@ public function getServerParameter(string $key, mixed $default = ''): mixed
154154
return$this->server[$key] ?? $default;
155155
}
156156

157-
publicfunctionxmlHttpRequest(string$method, string$uri, array$parameters = [], array$files = [], array$server = [], string$content = null, bool$changeHistory = true): Crawler
157+
publicfunctionxmlHttpRequest(string$method, string$uri, array$parameters = [], array$files = [], array$server = [], ?string$content = null, bool$changeHistory = true): Crawler
158158
{
159159
$this->setServerParameter('HTTP_X_REQUESTED_WITH', 'XMLHttpRequest');
160160

@@ -339,7 +339,7 @@ public function submitForm(string $button, array $fieldValues = [], string $meth
339339
* @param string $content The raw body data
340340
* @param bool $changeHistory Whether to update the history or not (only used internally for back(), forward(), and reload())
341341
*/
342-
publicfunctionrequest(string$method, string$uri, array$parameters = [], array$files = [], array$server = [], string$content = null, bool$changeHistory = true): Crawler
342+
publicfunctionrequest(string$method, string$uri, array$parameters = [], array$files = [], array$server = [], ?string$content = null, bool$changeHistory = true): Crawler
343343
{
344344
if ($this->isMainRequest) {
345345
$this->redirectCount = 0;

‎Cookie.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class Cookie
5858
* @param bool $encodedValue Whether the value is encoded or not
5959
* @param string|null $samesite The cookie samesite attribute
6060
*/
61-
publicfunction__construct(string$name, ?string$value, string$expires = null, string$path = null, string$domain = '', bool$secure = false, bool$httponly = true, bool$encodedValue = false, string$samesite = null)
61+
publicfunction__construct(string$name, ?string$value, ?string$expires = null, ?string$path = null, string$domain = '', bool$secure = false, bool$httponly = true, bool$encodedValue = false, ?string$samesite = null)
6262
{
6363
if ($encodedValue) {
6464
$this->rawValue = $value ?? '';
@@ -124,7 +124,7 @@ public function __toString(): string
124124
*
125125
* @throws InvalidArgumentException
126126
*/
127-
publicstaticfunctionfromString(string$cookie, string$url = null): static
127+
publicstaticfunctionfromString(string$cookie, ?string$url = null): static
128128
{
129129
$parts = explode(';', $cookie);
130130

‎CookieJar.php‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function set(Cookie $cookie)
3838
* (this behavior ensures a BC behavior with previous versions of
3939
* Symfony).
4040
*/
41-
publicfunctionget(string$name, string$path = '/', string$domain = null): ?Cookie
41+
publicfunctionget(string$name, string$path = '/', ?string$domain = null): ?Cookie
4242
{
4343
$this->flushExpiredCookies();
4444

@@ -72,7 +72,7 @@ public function get(string $name, string $path = '/', string $domain = null): ?C
7272
*
7373
* @return void
7474
*/
75-
publicfunctionexpire(string$name, ?string$path = '/', string$domain = null)
75+
publicfunctionexpire(string$name, ?string$path = '/', ?string$domain = null)
7676
{
7777
$path ??= '/';
7878

@@ -114,7 +114,7 @@ public function clear()
114114
*
115115
* @return void
116116
*/
117-
publicfunctionupdateFromSetCookie(array$setCookies, string$uri = null)
117+
publicfunctionupdateFromSetCookie(array$setCookies, ?string$uri = null)
118118
{
119119
$cookies = [];
120120

@@ -142,7 +142,7 @@ public function updateFromSetCookie(array $setCookies, string $uri = null)
142142
*
143143
* @return void
144144
*/
145-
publicfunctionupdateFromResponse(Response$response, string$uri = null)
145+
publicfunctionupdateFromResponse(Response$response, ?string$uri = null)
146146
{
147147
$this->updateFromSetCookie($response->getHeader('Set-Cookie', false), $uri);
148148
}

‎HttpBrowser.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class HttpBrowser extends AbstractBrowser
2929
{
3030
privateHttpClientInterface$client;
3131

32-
publicfunction__construct(HttpClientInterface$client = null, History$history = null, CookieJar$cookieJar = null)
32+
publicfunction__construct(?HttpClientInterface$client = null, ?History$history = null, ?CookieJar$cookieJar = null)
3333
{
3434
if (!$client && !class_exists(HttpClient::class)) {
3535
thrownewLogicException(sprintf('You cannot use "%s" as the HttpClient component is not installed. Try running "composer require symfony/http-client".', __CLASS__));

‎Request.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Request
3333
* @param array $server An array of server parameters
3434
* @param string $content The raw body data
3535
*/
36-
publicfunction__construct(string$uri, string$method, array$parameters = [], array$files = [], array$cookies = [], array$server = [], string$content = null)
36+
publicfunction__construct(string$uri, string$method, array$parameters = [], array$files = [], array$cookies = [], array$server = [], ?string$content = null)
3737
{
3838
$this->uri = $uri;
3939
$this->method = $method;

‎Test/Constraint/BrowserCookieValueSame.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ final class BrowserCookieValueSame extends Constraint
2222
privatestring$path;
2323
private ?string$domain;
2424

25-
publicfunction__construct(string$name, string$value, bool$raw = false, string$path = '/', string$domain = null)
25+
publicfunction__construct(string$name, string$value, bool$raw = false, string$path = '/', ?string$domain = null)
2626
{
2727
$this->name = $name;
2828
$this->path = $path;

‎Test/Constraint/BrowserHasCookie.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class BrowserHasCookie extends Constraint
2020
privatestring$path;
2121
private ?string$domain;
2222

23-
publicfunction__construct(string$name, string$path = '/', string$domain = null)
23+
publicfunction__construct(string$name, string$path = '/', ?string$domain = null)
2424
{
2525
$this->name = $name;
2626
$this->path = $path;

‎Tests/AbstractBrowserTest.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
class AbstractBrowserTest extends TestCase
2323
{
24-
publicfunctiongetBrowser(array$server = [], History$history = null, CookieJar$cookieJar = null)
24+
publicfunctiongetBrowser(array$server = [], ?History$history = null, ?CookieJar$cookieJar = null)
2525
{
2626
returnnewTestClient($server, $history, $cookieJar);
2727
}

‎Tests/HttpBrowserTest.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
class HttpBrowserTest extends AbstractBrowserTest
2121
{
22-
publicfunctiongetBrowser(array$server = [], History$history = null, CookieJar$cookieJar = null)
22+
publicfunctiongetBrowser(array$server = [], ?History$history = null, ?CookieJar$cookieJar = null)
2323
{
2424
returnnewTestHttpClient($server, $history, $cookieJar);
2525
}

‎Tests/TestHttpClient.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class TestHttpClient extends HttpBrowser
2323
protected ?Response$nextResponse = null;
2424
protectedstring$nextScript;
2525

26-
publicfunction__construct(array$server = [], History$history = null, CookieJar$cookieJar = null)
26+
publicfunction__construct(array$server = [], ?History$history = null, ?CookieJar$cookieJar = null)
2727
{
2828
$client = newMockHttpClient(function (string$method, string$url, array$options) {
2929
if (null === $this->nextResponse) {

0 commit comments

Comments
 (0)