Skip to content

Commit 6c910f3

Browse files
Merge branch '5.4' into 6.2
* 5.4: Migrate to `static` data providers using `rector/rector`
2 parents bda68ce + bed0998 commit 6c910f3

27 files changed

+54
-54
lines changed

Tests/AliasTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function testCannotDeprecateWithAnInvalidTemplate($message)
7979
$def->setDeprecated('package', '1.1', $message);
8080
}
8181

82-
public function invalidDeprecationMessageProvider()
82+
public static function invalidDeprecationMessageProvider()
8383
{
8484
return [
8585
"With \rs" => ["invalid \r message %alias_id%"],

Tests/Argument/TaggedIteratorArgumentTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function testDefaultIndexMethod(?string $indexAttribute, ?string $default
6767
$this->assertSame($expectedDefaultIndexMethod, $taggedIteratorArgument->getDefaultIndexMethod());
6868
}
6969

70-
public function defaultIndexMethodProvider()
70+
public static function defaultIndexMethodProvider()
7171
{
7272
yield 'No indexAttribute and no defaultIndexMethod' => [
7373
null,
@@ -116,7 +116,7 @@ public function testDefaultPriorityIndexMethod(?string $indexAttribute, ?string
116116
$this->assertSame($expectedDefaultPriorityMethod, $taggedIteratorArgument->getDefaultPriorityMethod());
117117
}
118118

119-
public function defaultPriorityMethodProvider()
119+
public static function defaultPriorityMethodProvider()
120120
{
121121
yield 'No indexAttribute and no defaultPriorityMethod' => [
122122
null,

Tests/ChildDefinitionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function testSetProperty($property, $changeKey)
4040
$this->assertSame([$changeKey => true], $def->getChanges());
4141
}
4242

43-
public function getPropertyTests()
43+
public static function getPropertyTests()
4444
{
4545
return [
4646
['class', 'class'],

Tests/Compiler/AliasDeprecatedPublicServicesPassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function testProcessWithMissingAttribute(string $attribute, array $attrib
5858
(new AliasDeprecatedPublicServicesPass())->process($container);
5959
}
6060

61-
public function processWithMissingAttributeProvider()
61+
public static function processWithMissingAttributeProvider()
6262
{
6363
return [
6464
['package', ['version' => '1.2']],

Tests/Compiler/AutowirePassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ public function testNotWireableCalls($method, $expectedMsg)
911911
}
912912
}
913913

914-
public function provideNotWireableCalls()
914+
public static function provideNotWireableCalls()
915915
{
916916
return [
917917
['setNotAutowireable', 'Cannot autowire service "foo": argument "$n" of method "Symfony\Component\DependencyInjection\Tests\Compiler\NotWireable::setNotAutowireable()" has type "Symfony\Component\DependencyInjection\Tests\Compiler\NotARealClass" but this class was not found.'],

Tests/Compiler/CheckArgumentsValidityPassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function testException(array $arguments, array $methodCalls)
5656
$pass->process($container);
5757
}
5858

59-
public function definitionProvider()
59+
public static function definitionProvider()
6060
{
6161
return [
6262
[['a' => 'a', null], []],

Tests/Compiler/IntegrationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ public function testYamlContainerCompiles($directory, $actualServiceId, $expecte
268268
$this->assertEquals($expectedService, $actualService);
269269
}
270270

271-
public function getYamlCompileTests()
271+
public static function getYamlCompileTests()
272272
{
273273
$container = new ContainerBuilder();
274274
$container->registerForAutoconfiguration(IntegrationTestStub::class);

Tests/Compiler/PriorityTaggedServiceTraitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public function testTheIndexedTagsByDefaultIndexMethodFailure(string $defaultInd
182182
$priorityTaggedServiceTraitImplementation->test($tag, $container);
183183
}
184184

185-
public function provideInvalidDefaultMethods(): iterable
185+
public static function provideInvalidDefaultMethods(): iterable
186186
{
187187
yield ['getMethodShouldBeStatic', null, sprintf('Method "%s::getMethodShouldBeStatic()" should be static.', FooTaggedForInvalidDefaultMethodClass::class)];
188188
yield ['getMethodShouldBeStatic', 'foo', sprintf('Either method "%s::getMethodShouldBeStatic()" should be static or tag "my_custom_tag" on service "service1" is missing attribute "foo".', FooTaggedForInvalidDefaultMethodClass::class)];

Tests/Compiler/ResolveClassPassTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function testResolveClassFromId($serviceId)
3333
$this->assertSame($serviceId, $def->getClass());
3434
}
3535

36-
public function provideValidClassId()
36+
public static function provideValidClassId()
3737
{
3838
yield ['Acme\UnknownClass'];
3939
yield [CaseSensitiveClass::class];
@@ -52,7 +52,7 @@ public function testWontResolveClassFromId($serviceId)
5252
$this->assertNull($def->getClass());
5353
}
5454

55-
public function provideInvalidClassId()
55+
public static function provideInvalidClassId()
5656
{
5757
yield [\stdClass::class];
5858
yield ['bar'];

Tests/Compiler/ResolveFactoryClassPassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function testInlinedDefinitionFactoryIsProcessed()
4646
$this->assertSame(['Baz\Qux', 'getInstance'], $factory->getFactory()[0]->getFactory());
4747
}
4848

49-
public function provideFulfilledFactories()
49+
public static function provideFulfilledFactories()
5050
{
5151
return [
5252
[['Foo\Bar', 'create']],

0 commit comments

Comments
 (0)