Skip to content

Commit c0a1e5f

Browse files
Merge branch '6.2' into 6.3
* 6.2: Fix merge Migrate to `static` data providers using `rector/rector`
2 parents 08418ca + fa788ff commit c0a1e5f

21 files changed

+34
-34
lines changed

Tests/Authentication/AuthenticatorManagerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function testAuthenticateRequest($matchingAuthenticatorIndex)
119119
$this->assertTrue($listenerCalled, 'The CheckPassportEvent listener is not called');
120120
}
121121

122-
public function provideMatchingAuthenticatorIndex()
122+
public static function provideMatchingAuthenticatorIndex()
123123
{
124124
yield [0];
125125
yield [1];
@@ -187,7 +187,7 @@ public function testEraseCredentials($eraseCredentials)
187187
$manager->authenticateRequest($this->request);
188188
}
189189

190-
public function provideEraseCredentialsData()
190+
public static function provideEraseCredentialsData()
191191
{
192192
yield [true];
193193
yield [false];

Tests/Authenticator/AbstractLoginFormAuthenticatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function testSupports(string $loginUrl, Request $request, bool $expected)
3131
$this->assertSame($expected, $authenticator->supports($request));
3232
}
3333

34-
public function provideSupportsData(): iterable
34+
public static function provideSupportsData(): iterable
3535
{
3636
yield [
3737
'/login',

Tests/Authenticator/AccessToken/ChainedAccessTokenExtractorsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function testSupport($request)
4848
$this->assertNull($this->authenticator->supports($request));
4949
}
5050

51-
public function provideSupportData(): iterable
51+
public static function provideSupportData(): iterable
5252
{
5353
yield [new Request([], [], [], [], [], ['HTTP_AUTHORIZATION' => 'Bearer VALID_ACCESS_TOKEN'])];
5454
yield [new Request([], [], [], [], [], ['HTTP_AUTHORIZATION' => 'Bearer INVALID_ACCESS_TOKEN'])];
@@ -77,7 +77,7 @@ public function testAuthenticateInvalid($request, $errorMessage, $exceptionType
7777
$this->authenticator->authenticate($request);
7878
}
7979

80-
public function provideInvalidAuthenticateData(): iterable
80+
public static function provideInvalidAuthenticateData(): iterable
8181
{
8282
$request = new Request();
8383
yield [$request, 'Invalid credentials.', BadCredentialsException::class];

Tests/Authenticator/AccessToken/FormEncodedBodyAccessTokenAuthenticatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function testAuthenticateInvalid($request, $errorMessage, $exceptionType
9292
$this->authenticator->authenticate($request);
9393
}
9494

95-
public function provideInvalidAuthenticateData(): iterable
95+
public static function provideInvalidAuthenticateData(): iterable
9696
{
9797
$request = new Request();
9898
$request->setMethod(Request::METHOD_GET);

Tests/Authenticator/AccessToken/HeaderAccessTokenAuthenticatorTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function testSupport($request)
4545
$this->assertNull($this->authenticator->supports($request));
4646
}
4747

48-
public function provideSupportData(): iterable
48+
public static function provideSupportData(): iterable
4949
{
5050
yield [new Request([], [], [], [], [], ['HTTP_AUTHORIZATION' => 'Bearer VALID_ACCESS_TOKEN'])];
5151
yield [new Request([], [], [], [], [], ['HTTP_AUTHORIZATION' => 'Bearer INVALID_ACCESS_TOKEN'])];
@@ -61,7 +61,7 @@ public function testSupportsWithCustomTokenType($request, $result)
6161
$this->assertSame($result, $this->authenticator->supports($request));
6262
}
6363

64-
public function provideSupportsWithCustomTokenTypeData(): iterable
64+
public static function provideSupportsWithCustomTokenTypeData(): iterable
6565
{
6666
yield [new Request([], [], [], [], [], ['HTTP_AUTHORIZATION' => 'JWT VALID_ACCESS_TOKEN']), null];
6767
yield [new Request([], [], [], [], [], ['HTTP_AUTHORIZATION' => 'JWT INVALID_ACCESS_TOKEN']), null];
@@ -79,7 +79,7 @@ public function testSupportsWithCustomHeaderParameter($request, $result)
7979
$this->assertSame($result, $this->authenticator->supports($request));
8080
}
8181

82-
public function provideSupportsWithCustomHeaderParameter(): iterable
82+
public static function provideSupportsWithCustomHeaderParameter(): iterable
8383
{
8484
yield [new Request([], [], [], [], [], ['HTTP_X_FOO' => 'Bearer VALID_ACCESS_TOKEN']), null];
8585
yield [new Request([], [], [], [], [], ['HTTP_X_FOO' => 'Bearer INVALID_ACCESS_TOKEN']), null];
@@ -120,7 +120,7 @@ public function testAuthenticateInvalid($request, $errorMessage, $exceptionType
120120
$this->authenticator->authenticate($request);
121121
}
122122

123-
public function provideInvalidAuthenticateData(): iterable
123+
public static function provideInvalidAuthenticateData(): iterable
124124
{
125125
$request = new Request();
126126
yield [$request, 'Invalid credentials.', BadCredentialsException::class];

Tests/Authenticator/AccessToken/QueryAccessTokenAuthenticatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function testAuthenticateInvalid($request, $errorMessage, $exceptionType
8888
$this->authenticator->authenticate($request);
8989
}
9090

91-
public function provideInvalidAuthenticateData(): iterable
91+
public static function provideInvalidAuthenticateData(): iterable
9292
{
9393
$request = new Request();
9494
yield [$request, 'Invalid credentials.', BadCredentialsException::class];

Tests/Authenticator/FormLoginAuthenticatorTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function testHandleWhenUsernameLength($username, $ok)
6060
$this->authenticator->authenticate($request);
6161
}
6262

63-
public function provideUsernamesForLength()
63+
public static function provideUsernamesForLength()
6464
{
6565
yield [str_repeat('x', UserBadge::MAX_USERNAME_LENGTH + 1), false];
6666
yield [str_repeat('x', UserBadge::MAX_USERNAME_LENGTH - 1), true];
@@ -126,7 +126,7 @@ public function testHandleNonStringUsernameWithToString($postOnly)
126126
$this->authenticator->authenticate($request);
127127
}
128128

129-
public function postOnlyDataProvider()
129+
public static function postOnlyDataProvider()
130130
{
131131
yield [true];
132132
yield [false];
@@ -171,7 +171,7 @@ public function testSupportsFormOnly(string $contentType, bool $shouldSupport)
171171
$this->assertSame($shouldSupport, $this->authenticator->supports($request));
172172
}
173173

174-
public function provideContentTypes()
174+
public static function provideContentTypes()
175175
{
176176
yield ['application/json', false];
177177
yield ['application/x-www-form-urlencoded', true];

Tests/Authenticator/HttpBasicAuthenticatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function testHttpBasicServerParametersMissing(array $serverParameters)
6767
$this->assertFalse($this->authenticator->supports($request));
6868
}
6969

70-
public function provideMissingHttpBasicServerParameters()
70+
public static function provideMissingHttpBasicServerParameters()
7171
{
7272
return [
7373
[[]],

Tests/Authenticator/JsonLoginAuthenticatorTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function testSupport($request)
4848
$this->assertTrue($this->authenticator->supports($request));
4949
}
5050

51-
public function provideSupportData()
51+
public static function provideSupportData()
5252
{
5353
yield [new Request([], [], [], [], [], ['HTTP_CONTENT_TYPE' => 'application/json'], '{"username": "dunglas", "password": "foo"}')];
5454

@@ -67,7 +67,7 @@ public function testSupportsWithCheckPath($request, $result)
6767
$this->assertSame($result, $this->authenticator->supports($request));
6868
}
6969

70-
public function provideSupportsWithCheckPathData()
70+
public static function provideSupportsWithCheckPathData()
7171
{
7272
yield [Request::create('/api/login', 'GET', [], [], [], ['HTTP_CONTENT_TYPE' => 'application/json']), true];
7373
yield [Request::create('/login', 'GET', [], [], [], ['HTTP_CONTENT_TYPE' => 'application/json']), false];
@@ -107,7 +107,7 @@ public function testAuthenticateInvalid($request, $errorMessage, $exceptionType
107107
$this->authenticator->authenticate($request);
108108
}
109109

110-
public function provideInvalidAuthenticateData()
110+
public static function provideInvalidAuthenticateData()
111111
{
112112
$request = new Request([], [], [], [], [], ['HTTP_CONTENT_TYPE' => 'application/json']);
113113
yield [$request, 'Invalid JSON.'];
@@ -142,7 +142,7 @@ public function testAuthenticationForEmptyCredentialDeprecation($request)
142142
$this->authenticator->authenticate($request);
143143
}
144144

145-
public function provideEmptyAuthenticateData()
145+
public static function provideEmptyAuthenticateData()
146146
{
147147
$request = new Request([], [], [], [], [], ['HTTP_CONTENT_TYPE' => 'application/json'], '{"username": "", "password": "notempty"}');
148148
yield [$request];

Tests/Authenticator/LoginLinkAuthenticatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function testSupport(array $options, $request, bool $supported)
5050
$this->assertEquals($supported, $this->authenticator->supports($request));
5151
}
5252

53-
public function provideSupportData()
53+
public static function provideSupportData()
5454
{
5555
yield [['check_route' => '/validate_link'], Request::create('/validate_link?hash=abc123'), true];
5656
yield [['check_route' => '/validate_link'], Request::create('/login?hash=abc123'), false];

0 commit comments

Comments
 (0)