Skip to content

Commit 717d2c9

Browse files
committed
Merge branch '6.4' into 7.1
* 6.4: Make more data providers static fix merge Mutate remaining data providers to static ones
2 parents 5c739b7 + 7e8c7d9 commit 717d2c9

File tree

14 files changed

+44
-60
lines changed

14 files changed

+44
-60
lines changed

src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public static function provideInlineStyleOptionsCases()
199199
];
200200
}
201201

202-
public function provideInlineStyleTagsWithUnknownOptions()
202+
public static function provideInlineStyleTagsWithUnknownOptions()
203203
{
204204
return [
205205
['<options=abc;>', 'abc'],

src/Symfony/Component/DependencyInjection/Tests/Attribute/AutowireTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function testCanUseParam()
7474
/**
7575
* @see testCanOnlySetOneParameter
7676
*/
77-
private static function provideMultipleParameters(): iterable
77+
public static function provideMultipleParameters(): iterable
7878
{
7979
yield [['service' => 'id', 'expression' => 'expr']];
8080

src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ public static function provideDistinguishedChoices()
577577
];
578578
}
579579

580-
public function provideSameKeyChoices()
580+
public static function provideSameKeyChoices()
581581
{
582582
// Only test types here that can be used as array keys
583583
return [
@@ -588,7 +588,7 @@ public function provideSameKeyChoices()
588588
];
589589
}
590590

591-
public function provideDistinguishedKeyChoices()
591+
public static function provideDistinguishedKeyChoices()
592592
{
593593
// Only test types here that can be used as array keys
594594
return [

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function testConstructorShouldThrowExceptionForMissingOptions(array $opti
9898
new MongoDbSessionHandler($this->manager, $options);
9999
}
100100

101-
public function provideInvalidOptions()
101+
public static function provideInvalidOptions(): iterable
102102
{
103103
yield 'empty' => [[]];
104104
yield 'collection missing' => [['database' => 'foo']];

src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHeaderLocationSameTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function testConstraintSuccess(string $requestUrl, ?string $location, str
3636
self::assertTrue($constraint->evaluate($response, '', true));
3737
}
3838

39-
public function provideSuccessCases(): iterable
39+
public static function provideSuccessCases(): iterable
4040
{
4141
yield ['http://example.com', 'http://example.com', 'http://example.com'];
4242
yield ['http://example.com', 'http://example.com', '//example.com'];
@@ -112,7 +112,7 @@ public function testConstraintFailure(string $requestUrl, ?string $location, str
112112
$constraint->evaluate($response);
113113
}
114114

115-
public function provideFailureCases(): iterable
115+
public static function provideFailureCases(): iterable
116116
{
117117
yield ['http://example.com', null, 'http://example.com'];
118118
yield ['http://example.com', null, '//example.com'];

src/Symfony/Component/Intl/Tests/LocalesTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ class LocalesTest extends ResourceBundleTestCase
2121
{
2222
public function testGetLocales()
2323
{
24-
$this->assertSame($this->getLocales(), Locales::getLocales());
24+
$this->assertSame(static::getLocales(), Locales::getLocales());
2525
}
2626

2727
public function testGetAliases()
2828
{
29-
$this->assertSame($this->getLocaleAliases(), Locales::getAliases());
29+
$this->assertSame(static::getLocaleAliases(), Locales::getAliases());
3030
}
3131

3232
/**
@@ -41,7 +41,7 @@ public function testGetNames($displayLocale)
4141
// We can't assert on exact list of locale, as there's too many variations.
4242
// The best we can do is to make sure getNames() returns a subset of what getLocales() returns.
4343
$this->assertNotEmpty($locales);
44-
$this->assertEmpty(array_diff($locales, $this->getLocales()));
44+
$this->assertEmpty(array_diff($locales, static::getLocales()));
4545
}
4646

4747
public function testGetNamesDefaultLocale()

src/Symfony/Component/Intl/Tests/ResourceBundleTestCase.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -762,24 +762,24 @@ public static function provideLocales()
762762
{
763763
return array_map(
764764
fn ($locale) => [$locale],
765-
self::getLocales()
765+
static::getLocales()
766766
);
767767
}
768768

769769
public static function provideLocaleAliases()
770770
{
771771
return array_map(
772772
fn ($alias, $ofLocale) => [$alias, $ofLocale],
773-
array_keys(self::getLocaleAliases()),
774-
self::getLocaleAliases()
773+
array_keys(static::getLocaleAliases()),
774+
static::getLocaleAliases()
775775
);
776776
}
777777

778778
public static function provideRootLocales()
779779
{
780780
return array_map(
781781
fn ($locale) => [$locale],
782-
self::getRootLocales()
782+
static::getRootLocales()
783783
);
784784
}
785785

@@ -796,8 +796,8 @@ protected static function getLocaleAliases()
796796
protected static function getRootLocales()
797797
{
798798
if (null === self::$rootLocales) {
799-
// ignore locales for which fallback is possible (e.g "en_GB")
800-
self::$rootLocales = array_filter(self::getLocales(), fn ($locale) => !str_contains($locale, '_'));
799+
// no locales for which fallback is possible (e.g "en_GB")
800+
self::$rootLocales = array_filter(static::getLocales(), fn ($locale) => !str_contains($locale, '_'));
801801
}
802802

803803
return self::$rootLocales;

src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ public function testFindAllSqlGenerated(AbstractPlatform $platform, string $expe
720720
$connection->findAll(50);
721721
}
722722

723-
public function provideFindAllSqlGeneratedByPlatform(): iterable
723+
public static function provideFindAllSqlGeneratedByPlatform(): iterable
724724
{
725725
yield 'MySQL' => [
726726
class_exists(MySQLPlatform::class) ? new MySQLPlatform() : new MySQL57Platform(),

src/Symfony/Component/Mime/Tests/MessageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ public function testEnsureValidity(array $headers, ?string $exceptionClass, ?str
306306
$m->ensureValidity();
307307
}
308308

309-
public function ensureValidityProvider()
309+
public static function ensureValidityProvider(): array
310310
{
311311
return [
312312
'Valid address fields' => [

src/Symfony/Component/Security/Http/Tests/Authenticator/AccessTokenAuthenticatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public function testAccessTokenHeaderRegex(string $input, ?string $expectedToken
177177
$this->assertEquals($expectedToken, $token);
178178
}
179179

180-
public function provideAccessTokenHeaderRegex(): array
180+
public static function provideAccessTokenHeaderRegex(): array
181181
{
182182
return [
183183
['Bearer token', 'token'],

0 commit comments

Comments
 (0)