8000 minor #59738 Make data providers static (alexandre-daubois) · symfony/symfony@20cdfab · GitHub
[go: up one dir, main page]

Skip to content

Commit 20cdfab

Browse files
minor #59738 Make data providers static (alexandre-daubois)
This PR was merged into the 7.3 branch. Discussion ---------- Make data providers static | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT Non-static data providers are deprecated. Fabbot also raised two formatting problems in the same files on anonymous class instanciation, so this PR also fixes them. Commits ------- 8bfa9a5 Make data providers static
2 parents 8275f13 + 8bfa9a5 commit 20cdfab

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Symfony/Component/Notifier/Bridge/Bluesky/Tests/BlueskyTransportTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ public function testWithEmbed(BlueskyOptions $blueskyOptions, string $expectedJs
317317
$this->assertSame('103254962155278888', $result->getMessageId());
318318
}
319319

320-
public function sendMessageWithEmbedDataProvider(): iterable
320+
public static function sendMessageWithEmbedDataProvider(): iterable
321321
{
322322
yield 'With media' => [
323323
'options' => (new BlueskyOptions())->attachMedia(new File(__DIR__.'/fixtures.gif'), 'A fixture'),

src/Symfony/Component/PropertyInfo/Tests/PropertyInfoCacheExtractorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function testIsInitializable()
9090
*/
9191
public function testNestedExtractorWithoutGetTypeImplementation(string $property, ?Type $expectedType)
9292
{
93-
$propertyInfoCacheExtractor = new PropertyInfoCacheExtractor(new class() implements PropertyInfoExtractorInterface {
93+
$propertyInfoCacheExtractor = new PropertyInfoCacheExtractor(new class implements PropertyInfoExtractorInterface {
9494
private PropertyTypeExtractorInterface $propertyTypeExtractor;
9595

9696
public function __construct()
@@ -136,7 +136,7 @@ public function getProperties(string $class, array $context = []): ?array
136136
}
137137
}
138138

139-
public function provideNestedExtractorWithoutGetTypeImplementationData()
139+
public static function provideNestedExtractorWithoutGetTypeImplementationData()
140140
{
141141
yield ['bar', Type::string()];
142142
yield ['baz', Type::int()];

src/Symfony/Component/PropertyInfo/Tests/PropertyInfoExtractorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class PropertyInfoExtractorTest extends AbstractPropertyInfoExtractorTest
3030
*/
3131
public function testNestedExtractorWithoutGetTypeImplementation(string $property, ?Type $expectedType)
3232
{
33-
$propertyInfoExtractor = new PropertyInfoExtractor([], [new class() implements PropertyTypeExtractorInterface {
33+
$propertyInfoExtractor = new PropertyInfoExtractor([], [new class implements PropertyTypeExtractorInterface {
3434
private PropertyTypeExtractorInterface $propertyTypeExtractor;
3535

3636
public function __construct()
@@ -51,7 +51,7 @@ public function getTypes(string $class, string $property, array $context = []):
5151
}
5252
}
5353

54-
public function provideNestedExtractorWithoutGetTypeImplementationData()
54+
public static function provideNestedExtractorWithoutGetTypeImplementationData()
5555
{
5656
yield ['bar', Type::string()];
5757
yield ['baz', Type::int()];

0 commit comments

Comments
 (0)
0