Skip to content

Commit 3f8fcde

Browse files
committed
Merge branch '7.4' into 8.0
* 7.4: sync nb translations with no translations fix: added new indonesian translations Fix Norwegian translations - remove needs-review-translation status Update Luxembourgish translations by removing 'needs-review-translation' state from multiple entries in security and validator files. Improve Russian translations for video and image validators [Validator] it: approve video/image/Twig translations and fix spacing (refs #60464) [HttpFoundation] Deprecate HTTP method override for methods GET, HEAD, CONNECT and TRACE [Translation][sv] Remove needs-review on Swedish strings; align phrasing and punctuation [HttpFoundation] Add `Request::$allowedHttpMethodOverride` to list which HTTP methods can be overridden
2 parents b43da82 + dc776e9 commit 3f8fcde

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

Tests/Authenticator/AbstractLoginFormAuthenticatorTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static function provideSupportsData(): iterable
3434
{
3535
yield [
3636
'/login',
37-
Request::create('http://localhost/login', Request::METHOD_POST, [], [], [], [
37+
Request::create('http://localhost/login', 'POST', [], [], [], [
3838
'DOCUMENT_ROOT' => '/var/www/app/public',
3939
'PHP_SELF' => '/index.php',
4040
'SCRIPT_FILENAME' => '/var/www/app/public/index.php',
@@ -44,7 +44,7 @@ public static function provideSupportsData(): iterable
4444
];
4545
yield [
4646
'/login',
47-
Request::create('http://localhost/somepath', Request::METHOD_POST, [], [], [], [
47+
Request::create('http://localhost/somepath', 'POST', [], [], [], [
4848
'DOCUMENT_ROOT' => '/var/www/app/public',
4949
'PHP_SELF' => '/index.php',
5050
'SCRIPT_FILENAME' => '/var/www/app/public/index.php',
@@ -54,7 +54,7 @@ public static function provideSupportsData(): iterable
5454
];
5555
yield [
5656
'/folder/login',
57-
Request::create('http://localhost/folder/login', Request::METHOD_POST, [], [], [], [
57+
Request::create('http://localhost/folder/login', 'POST', [], [], [], [
5858
'DOCUMENT_ROOT' => '/var/www/app/public',
5959
'PHP_SELF' => '/folder/index.php',
6060
'SCRIPT_FILENAME' => '/var/www/app/public/index.php',
@@ -64,7 +64,7 @@ public static function provideSupportsData(): iterable
6464
];
6565
yield [
6666
'/folder/login',
67-
Request::create('http://localhost/folder/somepath', Request::METHOD_POST, [], [], [], [
67+
Request::create('http://localhost/folder/somepath', 'POST', [], [], [], [
6868
'DOCUMENT_ROOT' => '/var/www/app/public',
6969
'PHP_SELF' => '/folder/index.php',
7070
'SCRIPT_FILENAME' => '/var/www/app/public/index.php',
@@ -74,7 +74,7 @@ public static function provideSupportsData(): iterable
7474
];
7575
yield [
7676
'/index.php/login',
77-
Request::create('http://localhost/index.php/login', Request::METHOD_POST, [], [], [], [
77+
Request::create('http://localhost/index.php/login', 'POST', [], [], [], [
7878
'DOCUMENT_ROOT' => '/var/www/app/public',
7979
'PHP_SELF' => '/index.php',
8080
'SCRIPT_FILENAME' => '/var/www/app/public/index.php',
@@ -84,7 +84,7 @@ public static function provideSupportsData(): iterable
8484
];
8585
yield [
8686
'/index.php/login',
87-
Request::create('http://localhost/index.php/somepath', Request::METHOD_POST, [], [], [], [
87+
Request::create('http://localhost/index.php/somepath', 'POST', [], [], [], [
8888
'DOCUMENT_ROOT' => '/var/www/app/public',
8989
'PHP_SELF' => '/index.php',
9090
'SCRIPT_FILENAME' => '/var/www/app/public/index.php',

Tests/Authenticator/AccessToken/FormEncodedBodyAccessTokenAuthenticatorTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function testSupport()
4040
$this->setUpAuthenticator();
4141
$request = new Request([], [], [], [], [], ['CONTENT_TYPE' => 'application/x-www-form-urlencoded']);
4242
$request->request->set('access_token', 'INVALID_ACCESS_TOKEN');
43-
$request->setMethod(Request::METHOD_POST);
43+
$request->setMethod('POST');
4444

4545
$this->assertNull($this->authenticator->supports($request));
4646
}
@@ -50,7 +50,7 @@ public function testSupportsWithCustomParameter()
5050
$this->setUpAuthenticator('protection-token');
5151
$request = new Request([], [], [], [], [], ['CONTENT_TYPE' => 'application/x-www-form-urlencoded']);
5252
$request->request->set('protection-token', 'INVALID_ACCESS_TOKEN');
53-
$request->setMethod(Request::METHOD_POST);
53+
$request->setMethod('POST');
5454

5555
$this->assertNull($this->authenticator->supports($request));
5656
}
@@ -61,7 +61,7 @@ public function testAuthenticate()
6161
$this->setUpAuthenticator();
6262
$request = new Request([], [], [], [], [], ['CONTENT_TYPE' => 'application/x-www-form-urlencoded'], 'access_token=VALID_ACCESS_TOKEN');
6363
$request->request->set('access_token', 'VALID_ACCESS_TOKEN');
64-
$request->setMethod(Request::METHOD_POST);
64+
$request->setMethod('POST');
6565

6666
$passport = $this->authenticator->authenticate($request);
6767
$this->assertInstanceOf(SelfValidatingPassport::class, $passport);
@@ -73,7 +73,7 @@ public function testAuthenticateWithCustomParameter()
7373
$this->setUpAuthenticator('protection-token');
7474
$request = new Request([], [], [], [], [], ['CONTENT_TYPE' => 'application/x-www-form-urlencoded']);
7575
$request->request->set('protection-token', 'VALID_ACCESS_TOKEN');
76-
$request->setMethod(Request::METHOD_POST);
76+
$request->setMethod('POST');
7777

7878
$passport = $this->authenticator->authenticate($request);
7979
$this->assertInstanceOf(SelfValidatingPassport::class, $passport);
@@ -93,24 +93,24 @@ public function testAuthenticateInvalid(Request $request, string $errorMessage,
9393
public static function provideInvalidAuthenticateData(): iterable
9494
{
9595
$request = new Request();
96-
$request->setMethod(Request::METHOD_GET);
96+
$request->setMethod('GET');
9797
yield [$request, 'Invalid credentials.', BadCredentialsException::class];
9898

9999
$request = new Request();
100-
$request->setMethod(Request::METHOD_POST);
100+
$request->setMethod('POST');
101101
yield [$request, 'Invalid credentials.', BadCredentialsException::class];
102102

103103
$request = new Request([], [], [], [], [], ['HTTP_AUTHORIZATION' => 'Bearer VALID_ACCESS_TOKEN']);
104-
$request->setMethod(Request::METHOD_POST);
104+
$request->setMethod('POST');
105105
yield [$request, 'Invalid credentials.', BadCredentialsException::class];
106106

107107
$request = new Request();
108-
$request->setMethod(Request::METHOD_POST);
108+
$request->setMethod('POST');
109109
$request->request->set('foo', 'VALID_ACCESS_TOKEN');
110110
yield [$request, 'Invalid credentials.', BadCredentialsException::class];
111111

112112
$request = new Request([], [], [], [], [], ['CONTENT_TYPE' => 'application/x-www-form-urlencoded']);
113-
$request->setMethod(Request::METHOD_POST);
113+
$request->setMethod('POST');
114114
$request->request->set('access_token', 'INVALID_ACCESS_TOKEN');
115115
yield [$request, 'Invalid access token or invalid user.', BadCredentialsException::class];
116116
}

0 commit comments

Comments
 (0)