Skip to content

Commit 80ea4f4

Browse files
Merge branch '6.2' into 6.3
* 6.2: Fix merge Migrate to `static` data providers using `rector/rector`
2 parents e29fb65 + 57f0d8f commit 80ea4f4

34 files changed

+78
-78
lines changed

Tests/AcceptHeaderItemTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function testFromString($string, $value, array $attributes)
2626
$this->assertEquals($attributes, $item->getAttributes());
2727
}
2828

29-
public function provideFromStringData()
29+
public static function provideFromStringData()
3030
{
3131
return [
3232
[
@@ -57,7 +57,7 @@ public function testToString($value, array $attributes, $string)
5757
$this->assertEquals($string, (string) $item);
5858
}
5959

60-
public function provideToStringData()
60+
public static function provideToStringData()
6161
{
6262
return [
6363
[

Tests/AcceptHeaderTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function testFromString($string, array $items)
3737
$this->assertEquals($items, $parsed);
3838
}
3939

40-
public function provideFromStringData()
40+
public static function provideFromStringData()
4141
{
4242
return [
4343
['', []],
@@ -57,7 +57,7 @@ public function testToString(array $items, $string)
5757
$this->assertEquals($string, (string) $header);
5858
}
5959

60-
public function provideToStringData()
60+
public static function provideToStringData()
6161
{
6262
return [
6363
[[], ''],
@@ -76,7 +76,7 @@ public function testFilter($string, $filter, array $values)
7676
$this->assertEquals($values, array_keys($header->all()));
7777
}
7878

79-
public function provideFilterData()
79+
public static function provideFilterData()
8080
{
8181
return [
8282
['fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4', '/fr.*/', ['fr-FR', 'fr']],
@@ -92,7 +92,7 @@ public function testSorting($string, array $values)
9292
$this->assertEquals($values, array_keys($header->all()));
9393
}
9494

95-
public function provideSortingData()
95+
public static function provideSortingData()
9696
{
9797
return [
9898
'quality has priority' => ['*;q=0.3,ISO-8859-1,utf-8;q=0.7', ['ISO-8859-1', 'utf-8', '*']],
@@ -110,7 +110,7 @@ public function testDefaultValue($acceptHeader, $value, $expectedQuality)
110110
$this->assertSame($expectedQuality, $header->get($value)->getQuality());
111111
}
112112

113-
public function provideDefaultValueData()
113+
public static function provideDefaultValueData()
114114
{
115115
yield ['text/plain;q=0.5, text/html, text/x-dvi;q=0.8, *;q=0.3', 'text/xml', 0.3];
116116
yield ['text/plain;q=0.5, text/html, text/x-dvi;q=0.8, */*;q=0.3', 'text/xml', 0.3];

Tests/BinaryFileResponseTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public function testRequestsWithoutEtag($requestRange, $offset, $length, $respon
142142
$this->assertEquals($responseRange, $response->headers->get('Content-Range'));
143143
}
144144

145-
public function provideRanges()
145+
public static function provideRanges()
146146
{
147147
return [
148148
['bytes=1-4', 1, 4, 'bytes 1-4/35'],
@@ -196,7 +196,7 @@ public function testFullFileRequests($requestRange)
196196
$this->assertEquals(200, $response->getStatusCode());
197197
}
198198

199-
public function provideFullFileRanges()
199+
public static function provideFullFileRanges()
200200
{
201201
return [
202202
['bytes=0-'],
@@ -262,7 +262,7 @@ public function testInvalidRequests($requestRange)
262262
$this->assertEquals('bytes */35', $response->headers->get('Content-Range'));
263263
}
264264

265-
public function provideInvalidRanges()
265+
public static function provideInvalidRanges()
266266
{
267267
return [
268268
['bytes=-40'],
@@ -288,7 +288,7 @@ public function testXSendfile($file)
288288
$this->assertStringContainsString('README.md', $response->headers->get('X-Sendfile'));
289289
}
290290

291-
public function provideXSendfileFiles()
291+
public static function provideXSendfileFiles()
292292
{
293293
return [
294294
[__DIR__.'/../README.md'],
@@ -354,7 +354,7 @@ public function testAcceptRangeNotOverriden()
354354
$this->assertEquals('foo', $response->headers->get('Accept-Ranges'));
355355
}
356356

357-
public function getSampleXAccelMappings()
357+
public static function getSampleXAccelMappings()
358358
{
359359
return [
360360
['/var/www/var/www/files/foo.txt', '/var/www/=/files/', '/files/var/www/files/foo.txt'],

Tests/CookieTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*/
2525
class CookieTest extends TestCase
2626
{
27-
public function namesWithSpecialCharacters()
27+
public static function namesWithSpecialCharacters()
2828
{
2929
return [
3030
[',MyName'],

Tests/ExpressionRequestMatcherTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function testMatchesWhenParentMatchesIsFalse($expression)
5454
$this->assertFalse($expressionRequestMatcher->matches($request));
5555
}
5656

57-
public function provideExpressions()
57+
public static function provideExpressions()
5858
{
5959
return [
6060
['request.getMethod() == method', true],

Tests/File/FileTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function testGetContent()
9393
$this->assertStringEqualsFile(__FILE__, $file->getContent());
9494
}
9595

96-
public function getFilenameFixtures()
96+
public static function getFilenameFixtures()
9797
{
9898
return [
9999
['original.gif', 'original.gif'],

Tests/File/UploadedFileTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public function testMoveLocalFileIsNotAllowed()
156156
$file->move(__DIR__.'/Fixtures/directory');
157157
}
158158

159-
public function failedUploadedFile()
159+
public static function failedUploadedFile()
160160
{
161161
foreach ([\UPLOAD_ERR_INI_SIZE, \UPLOAD_ERR_FORM_SIZE, \UPLOAD_ERR_PARTIAL, \UPLOAD_ERR_NO_FILE, \UPLOAD_ERR_CANT_WRITE, \UPLOAD_ERR_NO_TMP_DIR, \UPLOAD_ERR_EXTENSION, -1] as $error) {
162162
yield [new UploadedFile(
@@ -283,7 +283,7 @@ public function testIsInvalidOnUploadError($error)
283283
$this->assertFalse($file->isValid());
284284
}
285285

286-
public function uploadedFileErrorProvider()
286+
public static function uploadedFileErrorProvider()
287287
{
288288
return [
289289
[\UPLOAD_ERR_INI_SIZE],

Tests/HeaderUtilsTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function testSplit(array $expected, string $header, string $separator)
2424
$this->assertSame($expected, HeaderUtils::split($header, $separator));
2525
}
2626

27-
public function provideHeaderToSplit(): array
27+
public static function provideHeaderToSplit(): array
2828
{
2929
return [
3030
[['foo=123', 'bar'], 'foo=123,bar', ','],
@@ -111,7 +111,7 @@ public function testMakeDisposition($disposition, $filename, $filenameFallback,
111111
$this->assertEquals($expected, HeaderUtils::makeDisposition($disposition, $filename, $filenameFallback));
112112
}
113113

114-
public function provideMakeDisposition()
114+
public static function provideMakeDisposition()
115115
{
116116
return [
117117
['attachment', 'foo.html', 'foo.html', 'attachment; filename=foo.html'],
@@ -132,7 +132,7 @@ public function testMakeDispositionFail($disposition, $filename)
132132
HeaderUtils::makeDisposition($disposition, $filename);
133133
}
134134

135-
public function provideMakeDispositionFail()
135+
public static function provideMakeDispositionFail()
136136
{
137137
return [
138138
['attachment', 'foo%20bar.html'],
@@ -152,7 +152,7 @@ public function testParseQuery(string $query, string $expected = null)
152152
$this->assertSame($expected ?? $query, http_build_query(HeaderUtils::parseQuery($query), '', '&'));
153153
}
154154

155-
public function provideParseQuery()
155+
public static function provideParseQuery()
156156
{
157157
return [
158158
['a=b&c=d'],

Tests/IpUtilsTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function testIpv4($matches, $remoteAddr, $cidr)
2727
$this->assertSame($matches, IpUtils::checkIp($remoteAddr, $cidr));
2828
}
2929

30-
public function getIpv4Data()
30+
public static function getIpv4Data()
3131
{
3232
return [
3333
[true, '192.168.1.1', '192.168.1.1'],
@@ -58,7 +58,7 @@ public function testIpv6($matches, $remoteAddr, $cidr)
5858
$this->assertSame($matches, IpUtils::checkIp($remoteAddr, $cidr));
5959
}
6060

61-
public function getIpv6Data()
61+
public static function getIpv6Data()
6262
{
6363
return [
6464
[true, '2a01:198:603:0:396e:4789:8e99:890f', '2a01:198:603:0::/65'],
@@ -103,7 +103,7 @@ public function testInvalidIpAddressesDoNotMatch($requestIp, $proxyIp)
103103
$this->assertFalse(IpUtils::checkIp4($requestIp, $proxyIp));
104104
}
105105

106-
public function invalidIpAddressData()
106+
public static function invalidIpAddressData()
107107
{
108108
return [
109109
'invalid proxy wildcard' => ['192.168.20.13', '*'],
@@ -120,7 +120,7 @@ public function testAnonymize($ip, $expected)
120120
$this->assertSame($expected, IpUtils::anonymize($ip));
121121
}
122122

123-
public function anonymizedIpData()
123+
public static function anonymizedIpData()
124124
{
125125
return [
126126
['192.168.1.1', '192.168.1.0'],
@@ -146,7 +146,7 @@ public function testIp4SubnetMaskZero($matches, $remoteAddr, $cidr)
146146
$this->assertSame($matches, IpUtils::checkIp4($remoteAddr, $cidr));
147147
}
148148

149-
public function getIp4SubnetMaskZeroData()
149+
public static function getIp4SubnetMaskZeroData()
150150
{
151151
return [
152152
[true, '1.2.3.4', '0.0.0.0/0'],

Tests/RateLimiter/AbstractRequestRateLimiterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function testConsume(array $rateLimits, ?RateLimit $expected)
3333
$this->assertSame($expected, $rateLimiter->consume(new Request()));
3434
}
3535

36-
public function provideRateLimits()
36+
public static function provideRateLimits()
3737
{
3838
$now = new \DateTimeImmutable();
3939

0 commit comments

Comments
 (0)