Skip to content

Commit 66bf9ee

Browse files
Merge branch '5.4' into 6.2
* 5.4: Migrate to `static` data providers using `rector/rector`
2 parents 0f56360 + c2314d8 commit 66bf9ee

File tree

49 files changed

+91
-91
lines changed

Some content is hidden

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

49 files changed

+91
-91
lines changed

Tests/AbstractLayoutTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2794,7 +2794,7 @@ public function testSubmitFormNoValidate(bool $validate)
27942794
$this->assertMatchesXpath($html, $xpath);
27952795
}
27962796

2797-
public function submitFormNoValidateProvider()
2797+
public static function submitFormNoValidateProvider()
27982798
{
27992799
return [
28002800
[false],

Tests/AbstractRequestHandlerTestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static function methodExceptGetProvider()
7575
];
7676
}
7777

78-
public function methodProvider()
78+
public static function methodProvider()
7979
{
8080
return array_merge([
8181
['GET'],
@@ -348,7 +348,7 @@ public function testAddFormErrorIfPostMaxSizeExceeded(?int $contentLength, strin
348348
}
349349
}
350350

351-
public function getPostMaxSizeFixtures()
351+
public static function getPostMaxSizeFixtures()
352352
{
353353
return [
354354
[1024 ** 3 + 1, '1G', true, ['{{ max }}' => '1G']],
@@ -381,7 +381,7 @@ public function testFailedFileUploadIsTurnedIntoFormError($errorCode, $expectedE
381381
$this->assertSame($expectedErrorCode, $this->requestHandler->getUploadFileError($this->getFailedUploadedFile($errorCode)));
382382
}
383383

384-
public function uploadFileErrorCodes()
384+
public static function uploadFileErrorCodes()
385385
{
386386
return [
387387
'no error' => [\UPLOAD_ERR_OK, null],

Tests/ButtonBuilderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
class ButtonBuilderTest extends TestCase
2222
{
23-
public function getValidNames()
23+
public static function getValidNames()
2424
{
2525
return [
2626
['reset'],
@@ -47,7 +47,7 @@ public function testNameContainingIllegalCharacters()
4747
$this->assertInstanceOf(ButtonBuilder::class, new ButtonBuilder('button[]'));
4848
}
4949

50-
public function getInvalidNames()
50+
public static function getInvalidNames()
5151
{
5252
return [
5353
[''],

Tests/ButtonTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function testDisabledIfParentIsDisabled($parentDisabled, $buttonDisabled,
5757
$this->assertSame($result, $button->isDisabled());
5858
}
5959

60-
public function getDisabledStates()
60+
public static function getDisabledStates()
6161
{
6262
return [
6363
// parent, button, result

Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ public function testCreateViewDifferentAttributesClosure()
555555
$this->assertEquals(new ChoiceListView(), $view2);
556556
}
557557

558-
public function provideSameChoices()
558+
public static function provideSameChoices()
559559
{
560560
$object = (object) ['foo' => 'bar'];
561561

@@ -568,7 +568,7 @@ public function provideSameChoices()
568568
];
569569
}
570570

571-
public function provideDistinguishedChoices()
571+
public static function provideDistinguishedChoices()
572572
{
573573
return [
574574
[0, false],

Tests/Command/DebugCommandTest.php

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

200-
public function provideCompletionSuggestions(): iterable
200+
public static function provideCompletionSuggestions(): iterable
201201
{
202202
yield 'option --format' => [
203203
['--format', ''],

Tests/CompoundFormTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ public function testSubmitMapsSubmittedChildrenOntoEmptyData()
583583
$this->assertSame('Bernhard', $object['name']);
584584
}
585585

586-
public function requestMethodProvider()
586+
public static function requestMethodProvider()
587587
{
588588
return [
589589
['POST'],

Tests/Console/Descriptor/AbstractDescriptorTestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function testDescribeOption(OptionsResolver $optionsResolver, array $opti
8080
}
8181
}
8282

83-
public function getDescribeDefaultsTestData()
83+
public static function getDescribeDefaultsTestData()
8484
{
8585
$options['core_types'] = ['Symfony\Component\Form\Extension\Core\Type\FormType'];
8686
$options['service_types'] = ['Symfony\Bridge\Doctrine\Form\Type\EntityType'];
@@ -96,7 +96,7 @@ public function getDescribeDefaultsTestData()
9696
yield [null, $options, 'types_with_deprecated_options'];
9797
}
9898

99-
public function getDescribeResolvedFormTypeTestData()
99+
public static function getDescribeResolvedFormTypeTestData()
100100
{
101101
$typeExtensions = [new FormTypeCsrfExtension(new CsrfTokenManager())];
102102
$parent = new ResolvedFormType(new FormType(), $typeExtensions);
@@ -106,7 +106,7 @@ public function getDescribeResolvedFormTypeTestData()
106106
yield [new ResolvedFormType(new FooType(), [], $parent), ['decorated' => false, 'show_deprecated' => true], 'deprecated_options_of_type'];
107107
}
108108

109-
public function getDescribeOptionTestData()
109+
public static function getDescribeOptionTestData()
110110
{
111111
$parent = new ResolvedFormType(new FormType());
112112
$options['decorated'] = false;

Tests/DependencyInjection/FormPassTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public function testAddTaggedTypeExtensions(array $extensions, array $expectedRe
118118
$this->assertEquals($expectedRegisteredExtensions, $extDefinition->getArgument(1));
119119
}
120120

121-
public function addTaggedTypeExtensionsDataProvider()
121+
public static function addTaggedTypeExtensionsDataProvider()
122122
{
123123
return [
124124
[
@@ -275,7 +275,7 @@ public function testPrivateTaggedServices($id, $class, $tagName, callable $asser
275275
$assertion($container);
276276
}
277277

278-
public function privateTaggedServicesProvider()
278+
public static function privateTaggedServicesProvider()
279279
{
280280
return [
281281
[

Tests/Extension/Core/DataMapper/DataMapperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ public function testMapFormsToDataDoesNotChangeEqualDateTimeInstance($date)
345345
self::assertSame($publishedAtValue, $article['publishedAt']);
346346
}
347347

348-
public function provideDate(): array
348+
public static function provideDate(): array
349349
{
350350
return [
351351
[new \DateTime()],

0 commit comments

Comments
 (0)