Skip to content

Commit 16fb783

Browse files
committed
Merge branch '5.4' into 6.4
* 5.4: Mutate remaining data providers to static ones
2 parents e2bd169 + 6687e4e commit 16fb783

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
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/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/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: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -758,45 +758,45 @@ protected function tearDown(): void
758758
\Locale::setDefault($this->defaultLocale);
759759
}
760760

761-
public function provideLocales()
761+
public static function provideLocales()
762762
{
763763
return array_map(
764764
fn ($locale) => [$locale],
765-
$this->getLocales()
765+
static::getLocales()
766766
);
767767
}
768768

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

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

786-
protected function getLocales()
786+
protected static function getLocales()
787787
{
788788
return self::LOCALES;
789789
}
790790

791-
protected function getLocaleAliases()
791+
protected static function getLocaleAliases()
792792
{
793793
return self::LOCALE_ALIASES;
794794
}
795795

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

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

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

668-
public function provideFindAllSqlGeneratedByPlatform(): iterable
668+
public static function provideFindAllSqlGeneratedByPlatform(): iterable
669669
{
670670
yield 'MySQL' => [
671671
class_exists(MySQLPlatform::class) ? new MySQLPlatform() : new MySQL57Platform(),

src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,7 @@ public function testDenormalizeBooleanTypesWithNotMatchingData(array $data, stri
10801080
$normalizer->denormalize($data, $type);
10811081
}
10821082

1083-
public function provideBooleanTypesData()
1083+
public static function provideBooleanTypesData()
10841084
{
10851085
return [
10861086
[['foo' => true], FalsePropertyDummy::class],

src/Symfony/Component/String/Tests/AbstractUnicodeTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function testAsciiClosureRule()
5050
$this->assertSame('Dieser Wert sollte grOEsser oder gleich', (string) $s->ascii([$rule]));
5151
}
5252

53-
public function provideCreateFromCodePoint(): array
53+
public static function provideCreateFromCodePoint(): array
5454
{
5555
return [
5656
['', []],

0 commit comments

Comments
 (0)