Skip to content

Commit b8172b6

Browse files
Merge branch '6.2' into 6.3
* 6.2: Fix merge Migrate to `static` data providers using `rector/rector`
2 parents 34bd487 + d3033d4 commit b8172b6

28 files changed

+38
-38
lines changed

Tests/CacheWarmer/SerializerCacheWarmerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function testWarmUp(array $loaders)
4040
$this->assertTrue($arrayPool->getItem('Symfony_Bundle_FrameworkBundle_Tests_Fixtures_Serialization_Author')->isHit());
4141
}
4242

43-
public function loaderProvider()
43+
public static function loaderProvider()
4444
{
4545
return [
4646
[

Tests/Command/CachePoolClearCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function testComplete(array $input, array $expectedSuggestions)
4444
$this->assertSame($expectedSuggestions, $suggestions);
4545
}
4646

47-
public function provideCompletionSuggestions()
47+
public static function provideCompletionSuggestions()
4848
{
4949
yield 'pool_name' => [
5050
['f'],

Tests/Command/CachePoolDeleteCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function testComplete(array $input, array $expectedSuggestions)
9898
$this->assertSame($expectedSuggestions, $suggestions);
9999
}
100100

101-
public function provideCompletionSuggestions()
101+
public static function provideCompletionSuggestions()
102102
{
103103
yield 'pool_name' => [
104104
['f'],

Tests/Command/EventDispatcherDebugCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testComplete(array $input, array $expectedSuggestions)
3232
$this->assertSame($expectedSuggestions, $suggestions);
3333
}
3434

35-
public function provideCompletionSuggestions()
35+
public static function provideCompletionSuggestions()
3636
{
3737
yield 'event' => [[''], [MessageEvent::class, 'console.command']];
3838
yield 'event for other dispatcher' => [['--dispatcher', 'other_event_dispatcher', ''], ['other_event', 'App\OtherEvent']];

Tests/Command/SecretsRemoveCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function testComplete(bool $withLocalVault, array $input, array $expected
3737
$this->assertSame($expectedSuggestions, $suggestions);
3838
}
3939

40-
public function provideCompletionSuggestions()
40+
public static function provideCompletionSuggestions()
4141
{
4242
yield 'name' => [true, [''], ['SECRET', 'OTHER_SECRET']];
4343
yield '--local name (with local vault)' => [true, ['--local', ''], ['SECRET']];

Tests/Command/SecretsSetCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testComplete(array $input, array $expectedSuggestions)
3232
$this->assertSame($expectedSuggestions, $suggestions);
3333
}
3434

35-
public function provideCompletionSuggestions()
35+
public static function provideCompletionSuggestions()
3636
{
3737
yield 'name' => [[''], ['SECRET', 'OTHER_SECRET']];
3838
yield '--local name (with local vault)' => [['--local', ''], ['SECRET', 'OTHER_SECRET']];

Tests/Command/TranslationDebugCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ function ($path, $catalogue) use ($extractedMessagesWithDomains) {
269269
$this->assertSame($expectedSuggestions, $suggestions);
270270
}
271271

272-
public function provideCompletionSuggestions()
272+
public static function provideCompletionSuggestions()
273273
{
274274
yield 'locale' => [
275275
[''],

Tests/Command/TranslationUpdateCommandCompletionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function testComplete(array $input, array $expectedSuggestions)
4242
$this->assertSame($expectedSuggestions, $suggestions);
4343
}
4444

45-
public function provideCompletionSuggestions()
45+
public static function provideCompletionSuggestions()
4646
{
4747
$bundle = new ExtensionPresentBundle();
4848

Tests/Command/WorkflowDumpCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testComplete(array $input, array $expectedSuggestions)
3232
$this->assertSame($expectedSuggestions, $suggestions);
3333
}
3434

35-
public function provideCompletionSuggestions(): iterable
35+
public static function provideCompletionSuggestions(): iterable
3636
{
3737
yield 'option --dump-format' => [['--dump-format', ''], ['puml', 'mermaid', 'dot']];
3838
}

Tests/Controller/RedirectControllerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function testRoute($permanent, $keepRequestMethod, $keepQueryParams, $ign
103103
$this->assertEquals($expectedCode, $returnResponse->getStatusCode());
104104
}
105105

106-
public function provider()
106+
public static function provider()
107107
{
108108
return [
109109
[true, false, false, false, 301, ['additional-parameter' => 'value']],
@@ -210,7 +210,7 @@ public function testUrlRedirectDefaultPorts()
210210
$this->assertRedirectUrl($returnValue, $expectedUrl);
211211
}
212212

213-
public function urlRedirectProvider()
213+
public static function urlRedirectProvider()
214214
{
215215
return [
216216
// Standard ports
@@ -262,7 +262,7 @@ public function testUrlRedirect($scheme, $httpPort, $httpsPort, $requestScheme,
262262
$this->assertRedirectUrl($returnValue, $expectedUrl);
263263
}
264264

265-
public function pathQueryParamsProvider()
265+
public static function pathQueryParamsProvider()
266266
{
267267
return [
268268
['http://www.example.com/base/redirect-path', '/redirect-path', ''],

Tests/DependencyInjection/Compiler/DataCollectorTranslatorPassTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function testProcessKeepsDataCollectorIfTranslatorImplementsTranslatorBag
6868
$this->assertTrue($this->container->hasDefinition('data_collector.translation'));
6969
}
7070

71-
public function getImplementingTranslatorBagInterfaceTranslatorClassNames()
71+
public static function getImplementingTranslatorBagInterfaceTranslatorClassNames()
7272
{
7373
return [
7474
[Translator::class],
@@ -100,7 +100,7 @@ public function testProcessRemovesDataCollectorIfTranslatorDoesNotImplementTrans
100100
$this->assertFalse($this->container->hasDefinition('data_collector.translation'));
101101
}
102102

103-
public function getNotImplementingTranslatorBagInterfaceTranslatorClassNames()
103+
public static function getNotImplementingTranslatorBagInterfaceTranslatorClassNames()
104104
{
105105
return [
106106
['Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\TranslatorWithTranslatorBag'],

Tests/DependencyInjection/Compiler/ProfilerPassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function testValidCollector()
6262
$this->assertEquals('add', $methodCalls[0][0]); // grab the method part of the first call
6363
}
6464

65-
public function provideValidCollectorWithTemplateUsingAutoconfigure(): \Generator
65+
public static function provideValidCollectorWithTemplateUsingAutoconfigure(): \Generator
6666
{
6767
yield [new class() implements TemplateAwareDataCollectorInterface {
6868
public function collect(Request $request, Response $response, \Throwable $exception = null): void

Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function testInvalidSessionName($sessionName)
6161
);
6262
}
6363

64-
public function getTestInvalidSessionName()
64+
public static function getTestInvalidSessionName()
6565
{
6666
return [
6767
['a.b'],
@@ -115,7 +115,7 @@ public function testValidAssetsPackageNameConfiguration($packageName)
115115
$this->assertArrayHasKey($packageName, $config['assets']['packages']);
116116
}
117117

118-
public function provideValidAssetsPackageNameConfigurationTests()
118+
public static function provideValidAssetsPackageNameConfigurationTests()
119119
{
120120
return [
121121
['foobar'],
@@ -142,7 +142,7 @@ public function testInvalidAssetsConfiguration(array $assetConfig, $expectedMess
142142
]);
143143
}
144144

145-
public function provideInvalidAssetConfigurationTests()
145+
public static function provideInvalidAssetConfigurationTests()
146146
{
147147
// helper to turn config into embedded package config
148148
$createPackageConfig = fn (array $packageConfig) => [
@@ -194,7 +194,7 @@ public function testValidLockConfiguration($lockConfig, $processedConfig)
194194
$this->assertEquals($processedConfig, $config['lock']);
195195
}
196196

197-
public function provideValidLockConfigurationTests()
197+
public static function provideValidLockConfigurationTests()
198198
{
199199
yield [null, ['enabled' => true, 'resources' => ['default' => [class_exists(SemaphoreStore::class) && SemaphoreStore::isSupported() ? 'semaphore' : 'flock']]]];
200200

@@ -288,7 +288,7 @@ public function testValidSemaphoreConfiguration($semaphoreConfig, $processedConf
288288
$this->assertEquals($processedConfig, $config['semaphore']);
289289
}
290290

291-
public function provideValidSemaphoreConfigurationTests()
291+
public static function provideValidSemaphoreConfigurationTests()
292292
{
293293
yield [null, ['enabled' => true, 'resources' => []]];
294294

Tests/DependencyInjection/FrameworkExtensionTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,7 +1729,7 @@ public function testAppRedisTagAwareAdapter(string $configFile)
17291729
}
17301730
}
17311731

1732-
public function appRedisTagAwareConfigProvider(): array
1732+
public static function appRedisTagAwareConfigProvider(): array
17331733
{
17341734
return [
17351735
['cache_app_redis_tag_aware'],
@@ -1950,7 +1950,7 @@ public function testHttpClientFullDefaultOptions()
19501950
$this->assertSame(['foo' => ['bar' => 'baz']], $defaultOptions['extra']);
19511951
}
19521952

1953-
public function provideMailer(): array
1953+
public static function provideMailer(): array
19541954
{
19551955
return [
19561956
['mailer_with_dsn', ['main' => 'smtp://example.com']],

Tests/Functional/AbstractAttributeRoutingTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function testAnnotatedController(string $path, string $expectedValue)
3131
$this->assertSame('/annotated/create-transaction', $router->generate('symfony_framework_tests_functional_test_annotated_createtransaction'));
3232
}
3333

34-
public function getRoutes(): array
34+
public static function getRoutes(): array
3535
{
3636
return [
3737
['/null_request', Request::class],

Tests/Functional/ConfigDebugCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public function testComplete(array $input, array $expectedSuggestions)
164164
}
165165
}
166166

167-
public function provideCompletionSuggestions(): \Generator
167+
public static function provideCompletionSuggestions(): \Generator
168168
{
169169
yield 'name' => [[''], ['default_config_test', 'extension_without_config_test', 'framework', 'test']];
170170

Tests/Functional/ConfigDumpReferenceCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function testComplete(array $input, array $expectedSuggestions)
103103
$this->assertSame($expectedSuggestions, $suggestions);
104104
}
105105

106-
public function provideCompletionSuggestions(): iterable
106+
public static function provideCompletionSuggestions(): iterable
107107
{
108108
yield 'name' => [[''], ['DefaultConfigTestBundle', 'default_config_test', 'ExtensionWithoutConfigTestBundle', 'extension_without_config_test', 'FrameworkBundle', 'framework', 'TestBundle', 'test']];
109109
yield 'option --format' => [['--format', ''], ['yaml', 'xml']];

Tests/Functional/ContainerDebugCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public function testGetDeprecationNoFile()
242242
$this->assertStringContainsString('[WARNING] The deprecation file does not exist', $tester->getDisplay());
243243
}
244244

245-
public function provideIgnoreBackslashWhenFindingService()
245+
public static function provideIgnoreBackslashWhenFindingService()
246246
{
247247
return [
248248
[BackslashClass::class],
@@ -270,7 +270,7 @@ public function testComplete(array $input, array $expectedSuggestions, array $no
270270
}
271271
}
272272

273-
public function provideCompletionSuggestions()
273+
public static function provideCompletionSuggestions()
274274
{
275275
$serviceId = 'console.command.container_debug';
276276
$hiddenServiceId = '.console.command.container_debug.lazy';

Tests/Functional/DebugAutowiringCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public function testComplete(array $input, array $expectedSuggestions)
133133
}
134134
}
135135

136-
public function provideCompletionSuggestions(): \Generator
136+
public static function provideCompletionSuggestions(): \Generator
137137
{
138138
yield 'search' => [[''], ['SessionHandlerInterface', LoggerInterface::class, 'Psr\\Container\\ContainerInterface $parameterBag']];
139139
}

Tests/Functional/FragmentTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function testFragment($insulate)
3737
, $client->getResponse()->getContent());
3838
}
3939

40-
public function getConfigs()
40+
public static function getConfigs()
4141
{
4242
return [
4343
[false],

Tests/Functional/ProfilerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function testProfilerCollectParameter($insulate)
5757
$this->assertNull($client->getProfile());
5858
}
5959

60-
public function getConfigs()
60+
public static function getConfigs()
6161
{
6262
return [
6363
[false],

Tests/Functional/RouterDebugCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function testComplete(array $input, array $expectedSuggestions)
9696
$this->assertSame($expectedSuggestions, $tester->complete($input));
9797
}
9898

99-
public function provideCompletionSuggestions()
99+
public static function provideCompletionSuggestions()
100100
{
101101
yield 'option --format' => [
102102
['--format', ''],

Tests/Functional/RoutingConditionServiceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function testCondition(int $code, string $path)
2424
$this->assertSame($code, $client->getResponse()->getStatusCode());
2525
}
2626

27-
public function provideRoutes(): iterable
27+
public static function provideRoutes(): iterable
2828
{
2929
yield 'allowed by an autoconfigured service' => [
3030
200,

Tests/Functional/SecurityTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function testLoginUser(string $username, array $roles, ?string $firewallC
3333
$this->assertEquals('Welcome '.$username.'!', $client->getResponse()->getContent());
3434
}
3535

36-
public function getUsers()
36+
public static function getUsers()
3737
{
3838
yield ['the-username', ['ROLE_FOO'], null];
3939
yield ['the-username', ['ROLE_FOO'], 'main'];

Tests/Functional/SerializerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function testNormalizersAndEncodersUseDefaultContextConfigOption(string $
5252
self::assertEquals('foo', $defaultContext['fake_context_option']);
5353
}
5454

55-
public function provideNormalizersAndEncodersWithDefaultContextOption(): array
55+
public static function provideNormalizersAndEncodersWithDefaultContextOption(): array
5656
{
5757
return [
5858
['serializer.normalizer.constraint_violation_list.alias'],

Tests/Functional/SessionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public function testCorrectCacheControlHeadersForCacheableAction($config, $insul
144144
$this->assertSame('public, s-maxage=100', $response->headers->get('cache-control'));
145145
}
146146

147-
public function getConfigs()
147+
public static function getConfigs()
148148
{
149149
return [
150150
// configfile, insulate

Tests/Routing/RouterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ public function testBooleanContainerParametersWithinRouteCondition()
511511
$this->assertSame('1 or 0', $route->getCondition());
512512
}
513513

514-
public function getNonStringValues()
514+
public static function getNonStringValues()
515515
{
516516
return [[null], [false], [true], [new \stdClass()], [['foo', 'bar']], [[[]]]];
517517
}
@@ -591,7 +591,7 @@ public function testResolvingMethods()
591591
$this->assertEquals(['GET', 'POST'], $route->getMethods());
592592
}
593593

594-
public function getContainerParameterForRoute()
594+
public static function getContainerParameterForRoute()
595595
{
596596
yield 'String' => ['"foo"'];
597597
yield 'Integer' => [0];

Tests/Translation/TranslatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public function testResourceFilesOptionLoadsBeforeOtherAddedResources($debug, $e
178178
$translator->trans('some_message', [], null, 'some_locale');
179179
}
180180

181-
public function getDebugModeAndCacheDirCombinations()
181+
public static function getDebugModeAndCacheDirCombinations()
182182
{
183183
return [
184184
[false, false],

0 commit comments

Comments
 (0)