Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 46f3879

Browse files
Merge branch '6.2' into 6.3
* 6.2: Fix merge Migrate to `static` data providers using `rector/rector`
2 parents 88eefc9 + 36f9251 commit 46f3879

File tree

612 files changed

+1240
-1242
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

612 files changed

+1240
-1242
lines changed

src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public function testUsedProperIdentifier()
187187
$this->assertSame([null], $resolver->resolve($request, $argument));
188188
}
189189

190-
public function idsProvider(): iterable
190+
public static function idsProvider(): iterable
191191
{
192192
yield [1];
193193
yield [0];

src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public function testSerialization($param, array $types, $expected)
134134
$this->assertTrue($collectedQueries['default'][0]['runnable']);
135135
}
136136

137-
public function paramProvider(): array
137+
public static function paramProvider(): array
138138
{
139139
return [
140140
['some value', [], 'some value'],

src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorWithDebugStackTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function testSerialization($param, array $types, $expected, $explainable,
107107
$this->assertSame($runnable, $collectedQueries['default'][0]['runnable']);
108108
}
109109

110-
public function paramProvider(): array
110+
public static function paramProvider(): array
111111
{
112112
return [
113113
['some value', [], 'some value', true],

src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function testFixManagersAutoMappingsWithTwoAutomappings()
8181
$method->invoke($this->extension, $emConfigs, $bundles);
8282
}
8383

84-
public function getAutomappingData()
84+
public static function getAutomappingData()
8585
{
8686
return [
8787
[
@@ -192,7 +192,7 @@ public function testMappingTypeDetection()
192192
$this->assertSame($mappingType, 'attribute');
193193
}
194194

195-
public function providerBasicDrivers()
195+
public static function providerBasicDrivers()
196196
{
197197
return [
198198
['doctrine.orm.cache.apc.class', ['type' => 'apc']],
@@ -271,7 +271,7 @@ public function testUnrecognizedCacheDriverException()
271271
$this->invokeLoadCacheDriver($objectManager, $container, $cacheName);
272272
}
273273

274-
public function providerBundles()
274+
public static function providerBundles()
275275
{
276276
yield ['AnnotationsBundle', 'annotation', '/Entity'];
277277
yield ['AnnotationsOneLineBundle', 'annotation', '/Entity'];

src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,15 +255,15 @@ public function testEmbeddedIdentifierName()
255255
$loader->getEntitiesByIds('id.value', [1, '', 2, 3, 'foo']);
256256
}
257257

258-
public function provideGuidEntityClasses()
258+
public static function provideGuidEntityClasses()
259259
{
260260
return [
261261
['Symfony\Bridge\Doctrine\Tests\Fixtures\GuidIdEntity'],
262262
['Symfony\Bridge\Doctrine\Tests\Fixtures\UuidIdEntity'],
263263
];
264264
}
265265

266-
public function provideUidEntityClasses()
266+
public static function provideUidEntityClasses()
267267
{
268268
return [
269269
['Symfony\Bridge\Doctrine\Tests\Fixtures\UuidIdEntity'],

src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public function testChoiceTranslationDomainIsDisabledByDefault($expanded)
158158
}
159159
}
160160

161-
public function choiceTranslationDomainProvider()
161+
public static function choiceTranslationDomainProvider()
162162
{
163163
return [
164164
[false],

src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function testLog($sql, $params, $logParams)
4343
$dbalLogger->startQuery($sql, $params);
4444
}
4545

46-
public function getLogFixtures()
46+
public static function getLogFixtures()
4747
{
4848
return [
4949
['SQL', null, []],

src/Symfony/Bridge/Doctrine/Tests/Middleware/Debug/MiddlewareTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ private function getResourceFromString(string $str)
7878
return $res;
7979
}
8080

81-
public function provideExecuteMethod(): array
81+
public static function provideExecuteMethod(): array
8282
{
8383
return [
8484
'executeStatement' => [
@@ -168,7 +168,7 @@ public function testWithParamBound(callable $executeMethod)
168168
$this->assertGreaterThan(0, $debug[1]['executionMS']);
169169
}
170170

171-
public function provideEndTransactionMethod(): array
171+
public static function provideEndTransactionMethod(): array
172172
{
173173
return [
174174
'commit' => [static fn (Connection $conn) => $conn->commit(), '"COMMIT"'],
@@ -208,7 +208,7 @@ public function testTransaction(callable $endTransactionMethod, string $expected
208208
$this->assertGreaterThan(0, $debug[6]['executionMS']);
209209
}
210210

211-
public function provideExecuteAndEndTransactionMethods(): array
211+
public static function provideExecuteAndEndTransactionMethods(): array
212212
{
213213
return [
214214
'commit and exec' => [

src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function testExtractEnum()
132132
$this->assertNull($this->createExtractor()->getTypes(DoctrineEnum::class, 'enumCustom', []));
133133
}
134134

135-
public function typesProvider()
135+
public static function typesProvider()
136136
{
137137
$provider = [
138138
['id', [new Type(Type::BUILTIN_TYPE_INT)]],

src/Symfony/Bridge/Doctrine/Tests/Types/UlidTypeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function testGetGuidTypeDeclarationSQL(AbstractPlatform $platform, string
140140
$this->assertEquals($expectedDeclaration, $this->type->getSqlDeclaration(['length' => 36], $platform));
141141
}
142142

143-
public function provideSqlDeclarations(): array
143+
public static function provideSqlDeclarations(): array
144144
{
145145
return [
146146
[new PostgreSQLPlatform(), 'UUID'],

src/Symfony/Bridge/Doctrine/Tests/Types/UuidTypeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public function testGetGuidTypeDeclarationSQL(AbstractPlatform $platform, string
152152
$this->assertEquals($expectedDeclaration, $this->type->getSqlDeclaration(['length' => 36], $platform));
153153
}
154154

155-
public function provideSqlDeclarations(): array
155+
public static function provideSqlDeclarations(): array
156156
{
157157
return [
158158
[new PostgreSQLPlatform(), 'UUID'],

src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public function testValidateUniqueness(UniqueEntity $constraint)
186186
->assertRaised();
187187
}
188188

189-
public function provideUniquenessConstraints(): iterable
189+
public static function provideUniquenessConstraints(): iterable
190190
{
191191
yield 'Doctrine style' => [new UniqueEntity([
192192
'message' => 'myMessage',
@@ -219,7 +219,7 @@ public function testValidateCustomErrorPath(UniqueEntity $constraint)
219219
->assertRaised();
220220
}
221221

222-
public function provideConstraintsWithCustomErrorPath(): iterable
222+
public static function provideConstraintsWithCustomErrorPath(): iterable
223223
{
224224
yield 'Doctrine style' => [new UniqueEntity([
225225
'message' => 'myMessage',
@@ -278,7 +278,7 @@ public function testValidateUniquenessWithIgnoreNullDisabled(UniqueEntity $const
278278
->assertRaised();
279279
}
280280

281-
public function provideConstraintsWithIgnoreNullDisabled(): iterable
281+
public static function provideConstraintsWithIgnoreNullDisabled(): iterable
282282
{
283283
yield 'Doctrine style' => [new UniqueEntity([
284284
'message' => 'myMessage',
@@ -325,7 +325,7 @@ public function testNoValidationIfFirstFieldIsNullAndNullValuesAreIgnored(Unique
325325
$this->assertNoViolation();
326326
}
327327

328-
public function provideConstraintsWithIgnoreNullEnabled(): iterable
328+
public static function provideConstraintsWithIgnoreNullEnabled(): iterable
329329
{
330330
yield 'Doctrine style' => [new UniqueEntity([
331331
'message' => 'myMessage',
@@ -424,7 +424,7 @@ function () use ($entity) {
424424
$this->assertNoViolation();
425425
}
426426

427-
public function provideConstraintsWithCustomRepositoryMethod(): iterable
427+
public static function provideConstraintsWithCustomRepositoryMethod(): iterable
428428
{
429429
yield 'Doctrine style' => [new UniqueEntity([
430430
'message' => 'myMessage',
@@ -463,7 +463,7 @@ public function testValidateResultTypes($entity1, $result)
463463
$this->assertNoViolation();
464464
}
465465

466-
public function resultTypesProvider()
466+
public static function resultTypesProvider()
467467
{
468468
$entity = new SingleIntIdEntity(1, 'foo');
469469

@@ -876,7 +876,7 @@ public function testValueCanBeNull()
876876
$this->assertNoViolation();
877877
}
878878

879-
public function resultWithEmptyIterator(): array
879+
public static function resultWithEmptyIterator(): array
880880
{
881881
$entity = new SingleIntIdEntity(1, 'foo');
882882

src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public function testClassValidator(bool $expected, string $classValidatorRegexp
198198
$this->assertSame($expected, $doctrineLoader->loadClassMetadata($classMetadata));
199199
}
200200

201-
public function regexpProvider()
201+
public static function regexpProvider()
202202
{
203203
return [
204204
[false, null],

src/Symfony/Bridge/Monolog/Tests/Formatter/ConsoleFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function testFormat(array|LogRecord $record, $expectedMessage)
2828
self::assertSame($expectedMessage, $formatter->format($record));
2929
}
3030

31-
public function providerFormatTests(): array
31+
public static function providerFormatTests(): array
3232
{
3333
$currentDateTime = new \DateTimeImmutable();
3434

src/Symfony/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function testVerbosityMapping($verbosity, $level, $isHandling, array $map
8282
$this->assertFalse($handler->handle($infoRecord), 'The handler finished handling the log.');
8383
}
8484

85-
public function provideVerbosityMappingTests()
85+
public static function provideVerbosityMappingTests()
8686
{
8787
return [
8888
[OutputInterface::VERBOSITY_QUIET, Logger::ERROR, true],

src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/HttpCodeActivationStrategyTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function testIsActivated($url, $record, $expected)
5656
self::assertEquals($expected, $strategy->isHandlerActivated($record));
5757
}
5858

59-
public function isActivatedProvider(): array
59+
public static function isActivatedProvider(): array
6060
{
6161
return [
6262
['/test', RecordFactory::create(Logger::ERROR), true],
@@ -72,7 +72,7 @@ public function isActivatedProvider(): array
7272
];
7373
}
7474

75-
private function getContextException(int $code): array
75+
private static function getContextException(int $code): array
7676
{
7777
return ['exception' => new HttpException($code)];
7878
}

src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/NotFoundActivationStrategyTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function testIsActivated(string $url, array|LogRecord $record, bool $expe
3636
self::assertEquals($expected, $strategy->isHandlerActivated($record));
3737
}
3838

39-
public function isActivatedProvider(): array
39+
public static function isActivatedProvider(): array
4040
{
4141
return [
4242
['/test', RecordFactory::create(Logger::DEBUG), false],

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/ConfigurationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public function testItCanTellWhetherToDisplayAStackTrace()
179179
$this->assertTrue($configuration->shouldDisplayStackTrace('interesting'));
180180
}
181181

182-
public function provideItCanBeDisabled(): array
182+
public static function provideItCanBeDisabled(): array
183183
{
184184
return [
185185
['disabled', false],
@@ -248,7 +248,7 @@ public function testToleratesForIndividualGroups(string $deprecationsHelper, arr
248248
}
249249
}
250250

251-
public function provideDataForToleratesForGroup() {
251+
public static function provideDataForToleratesForGroup() {
252252

253253
yield 'total threshold not reached' => ['max[total]=1', [
254254
'unsilenced' => 0,

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function testItMutesOnlySpecificErrorMessagesWhenTheCallingCodeIsInPhpuni
9797
$this->assertSame($muted, $deprecation->isMuted());
9898
}
9999

100-
public function mutedProvider()
100+
public static function mutedProvider()
101101
{
102102
yield 'not from phpunit, and not a whitelisted message' => [
103103
false,
@@ -147,7 +147,7 @@ public function testItTakesMutesDeprecationFromPhpUnitFiles()
147147
$this->assertTrue($deprecation->isMuted());
148148
}
149149

150-
public function providerGetTypeDetectsSelf()
150+
public static function providerGetTypeDetectsSelf()
151151
{
152152
return [
153153
'not_from_vendors_file' => [Deprecation::TYPE_SELF, '', 'MyClass1', __FILE__],
@@ -182,7 +182,7 @@ public function testGetTypeDetectsSelf(string $expectedType, string $message, st
182182
$this->assertSame($expectedType, $deprecation->getType());
183183
}
184184

185-
public function providerGetTypeUsesRightTrace()
185+
public static function providerGetTypeUsesRightTrace()
186186
{
187187
$vendorDir = self::getVendorDir();
188188
$fakeTrace = [

src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function testCorrectAssigning(Definition $definition, $access)
9292
$this->assertStringMatchesFormat('%A$container->'.$access.'[\'foo\'] = %A', $code);
9393
}
9494

95-
public function getPrivatePublicDefinitions()
95+
public static function getPrivatePublicDefinitions()
9696
{
9797
return [
9898
[
@@ -166,7 +166,7 @@ protected function createProxy(\$class, \Closure \$factory)
166166
$this->assertSame(123, @$foo->dynamicProp);
167167
}
168168

169-
public function getProxyCandidates(): array
169+
public static function getProxyCandidates(): array
170170
{
171171
$definitions = [
172172
[new Definition(__CLASS__), true],

src/Symfony/Bridge/Twig/Tests/AppVariableTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function testDebug($debugFlag)
4343
$this->assertEquals($debugFlag, $this->appVariable->getDebug());
4444
}
4545

46-
public function debugDataProvider()
46+
public static function debugDataProvider()
4747
{
4848
return [
4949
'debug on' => [true],

src/Symfony/Bridge/Twig/Tests/Command/DebugCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function testDebugTemplateName(array $input, string $output, array $paths
8484
$this->assertStringMatchesFormat($output, $tester->getDisplay(true));
8585
}
8686

87-
public function getDebugTemplateNameTestData()
87+
public static function getDebugTemplateNameTestData()
8888
{
8989
$defaultPaths = [
9090
'templates/' => null,
@@ -311,7 +311,7 @@ public function testComplete(array $input, array $expectedSuggestions)
311311
$this->assertSame($expectedSuggestions, $suggestions);
312312
}
313313

314-
public function provideCompletionSuggestions(): iterable
314+
public static function provideCompletionSuggestions(): iterable
315315
{
316316
yield 'name' => [['email'], []];
317317
yield 'option --format' => [['--format', ''], ['text', 'json']];

src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php

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

149-
public function provideCompletionSuggestions()
149+
public static function provideCompletionSuggestions()
150150
{
151151
yield 'option' => [['--format', ''], ['txt', 'json', 'github']];
152152
}

src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ public function testGettingMethodAbbreviation($method, $abbr)
4444
$this->assertEquals($this->getExtension()->abbrMethod($method), $abbr);
4545
}
4646

47-
public function getClassNameProvider(): array
47+
public static function getClassNameProvider(): array
4848
{
4949
return [
5050
['F\Q\N\Foo', '<abbr title="F\Q\N\Foo">Foo</abbr>'],
5151
['Bare', '<abbr title="Bare">Bare</abbr>'],
5252
];
5353
}
5454

55-
public function getMethodNameProvider(): array
55+
public static function getMethodNameProvider(): array
5656
{
5757
return [
5858
['F\Q\N\Foo::Method', '<abbr title="F\Q\N\Foo">Foo</abbr>::Method()'],

src/Symfony/Bridge/Twig/Tests/Extension/DumpExtensionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function testDumpTag($template, $debug, $expectedOutput, $expectedDumped)
5353
$this->assertSame($expectedDumped, $dumped);
5454
}
5555

56-
public function getDumpTags()
56+
public static function getDumpTags()
5757
{
5858
return [
5959
['A{% dump %}B', true, 'AB', []],
@@ -88,7 +88,7 @@ public function testDump($context, $args, $expectedOutput, $debug = true)
8888
$this->assertEquals($expectedOutput, $dump);
8989
}
9090

91-
public function getDumpArgs()
91+
public static function getDumpArgs()
9292
{
9393
return [
9494
[[], [], '', false],

0 commit comments

Comments
 (0)