Skip to content

Commit f7042aa

Browse files
Merge branch '5.4' into 6.3
* 5.4: [Tests] Streamline [Validator] updated Romanian translation
2 parents dba2079 + 4eeac66 commit f7042aa

14 files changed

+30
-20
lines changed

Tests/CacheWarmer/SerializerCacheWarmerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function testWarmUp(array $loaders)
4040
$this->assertTrue($arrayPool->getItem('Symfony_Bundle_FrameworkBundle_Tests_Fixtures_Serialization_Author')->isHit());
4141
}
4242

43-
public static function loaderProvider()
43+
public static function loaderProvider(): array
4444
{
4545
return [
4646
[

Tests/Command/CachePoolClearCommandTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function testComplete(array $input, array $expectedSuggestions)
4444
$this->assertSame($expectedSuggestions, $suggestions);
4545
}
4646

47-
public static function provideCompletionSuggestions()
47+
public static function provideCompletionSuggestions(): iterable
4848
{
4949
yield 'pool_name' => [
5050
['f'],

Tests/Command/CachePoolDeleteCommandTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function testComplete(array $input, array $expectedSuggestions)
9898
$this->assertSame($expectedSuggestions, $suggestions);
9999
}
100100

101-
public static function provideCompletionSuggestions()
101+
public static function provideCompletionSuggestions(): iterable
102102
{
103103
yield 'pool_name' => [
104104
['f'],

Tests/Command/EventDispatcherDebugCommandTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testComplete(array $input, array $expectedSuggestions)
3232
$this->assertSame($expectedSuggestions, $suggestions);
3333
}
3434

35-
public static function provideCompletionSuggestions()
35+
public static function provideCompletionSuggestions(): iterable
3636
{
3737
yield 'event' => [[''], [MessageEvent::class, 'console.command']];
3838
yield 'event for other dispatcher' => [['--dispatcher', 'other_event_dispatcher', ''], ['other_event', 'App\OtherEvent']];

Tests/Command/SecretsRemoveCommandTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function testComplete(bool $withLocalVault, array $input, array $expected
3737
$this->assertSame($expectedSuggestions, $suggestions);
3838
}
3939

40-
public static function provideCompletionSuggestions()
40+
public static function provideCompletionSuggestions(): iterable
4141
{
4242
yield 'name' => [true, [''], ['SECRET', 'OTHER_SECRET']];
4343
yield '--local name (with local vault)' => [true, ['--local', ''], ['SECRET']];

Tests/Command/SecretsSetCommandTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testComplete(array $input, array $expectedSuggestions)
3232
$this->assertSame($expectedSuggestions, $suggestions);
3333
}
3434

35-
public static function provideCompletionSuggestions()
35+
public static function provideCompletionSuggestions(): iterable
3636
{
3737
yield 'name' => [[''], ['SECRET', 'OTHER_SECRET']];
3838
yield '--local name (with local vault)' => [['--local', ''], ['SECRET', 'OTHER_SECRET']];

Tests/Command/TranslationDebugCommandTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ function ($path, $catalogue) use ($extractedMessagesWithDomains) {
269269
$this->assertSame($expectedSuggestions, $suggestions);
270270
}
271271

272-
public static function provideCompletionSuggestions()
272+
public static function provideCompletionSuggestions(): iterable
273273
{
274274
yield 'locale' => [
275275
[''],

Tests/Command/TranslationUpdateCommandCompletionTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function testComplete(array $input, array $expectedSuggestions)
4242
$this->assertSame($expectedSuggestions, $suggestions);
4343
}
4444

45-
public static function provideCompletionSuggestions()
45+
public static function provideCompletionSuggestions(): iterable
4646
{
4747
$bundle = new ExtensionPresentBundle();
4848

Tests/Controller/AbstractControllerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ public function testdenyAccessUnlessGrantedSetsAttributesAsArray($attribute, $ex
386386
}
387387
}
388388

389-
public static function provideDenyAccessUnlessGrantedSetsAttributesAsArray()
389+
public static function provideDenyAccessUnlessGrantedSetsAttributesAsArray(): array
390390
{
391391
$obj = new \stdClass();
392392
$obj->foo = 'bar';

Tests/Controller/RedirectControllerTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function testRoute($permanent, $keepRequestMethod, $keepQueryParams, $ign
103103
$this->assertEquals($expectedCode, $returnResponse->getStatusCode());
104104
}
105105

106-
public static function provider()
106+
public static function provider(): array
107107
{
108108
return [
109109
[true, false, false, false, 301, ['additional-parameter' => 'value']],
@@ -210,7 +210,7 @@ public function testUrlRedirectDefaultPorts()
210210
$this->assertRedirectUrl($returnValue, $expectedUrl);
211211
}
212212

213-
public static function urlRedirectProvider()
213+
public static function urlRedirectProvider(): array
214214
{
215215
return [
216216
// Standard ports
@@ -262,7 +262,7 @@ public function testUrlRedirect($scheme, $httpPort, $httpsPort, $requestScheme,
262262
$this->assertRedirectUrl($returnValue, $expectedUrl);
263263
}
264264

265-
public static function pathQueryParamsProvider()
265+
public static function pathQueryParamsProvider(): array
266266
{
267267
return [
268268
['http://www.example.com/base/redirect-path', '/redirect-path', ''],

Tests/Controller/TemplateControllerTest.php

+12-2
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,23 @@ public function testTwig()
3232
$this->assertEquals('bar', $controller('mytemplate')->getContent());
3333
}
3434

35-
public function testNoTwig()
35+
public function testNoTwigTemplateActionMethod()
3636
{
37+
$controller = new TemplateController();
38+
3739
$this->expectException(\LogicException::class);
3840
$this->expectExceptionMessage('You cannot use the TemplateController if the Twig Bundle is not available. Try running "composer require symfony/twig-bundle".');
39-
$controller = new TemplateController();
4041

4142
$controller->templateAction('mytemplate')->getContent();
43+
}
44+
45+
public function testNoTwigInvokeMethod()
46+
{
47+
$controller = new TemplateController();
48+
49+
$this->expectException(\LogicException::class);
50+
$this->expectExceptionMessage('You cannot use the TemplateController if the Twig Bundle is not available.');
51+
4252
$controller('mytemplate')->getContent();
4353
}
4454

Tests/DependencyInjection/ConfigurationTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function testValidAssetsPackageNameConfiguration($packageName)
140140
$this->assertArrayHasKey($packageName, $config['assets']['packages']);
141141
}
142142

143-
public static function provideValidAssetsPackageNameConfigurationTests()
143+
public static function provideValidAssetsPackageNameConfigurationTests(): array
144144
{
145145
return [
146146
['foobar'],
@@ -167,7 +167,7 @@ public function testInvalidAssetsConfiguration(array $assetConfig, $expectedMess
167167
]);
168168
}
169169

170-
public static function provideInvalidAssetConfigurationTests()
170+
public static function provideInvalidAssetConfigurationTests(): iterable
171171
{
172172
// helper to turn config into embedded package config
173173
$createPackageConfig = fn (array $packageConfig) => [
@@ -219,7 +219,7 @@ public function testValidLockConfiguration($lockConfig, $processedConfig)
219219
$this->assertEquals($processedConfig, $config['lock']);
220220
}
221221

222-
public static function provideValidLockConfigurationTests()
222+
public static function provideValidLockConfigurationTests(): iterable
223223
{
224224
yield [null, ['enabled' => true, 'resources' => ['default' => [class_exists(SemaphoreStore::class) && SemaphoreStore::isSupported() ? 'semaphore' : 'flock']]]];
225225

Tests/Functional/ContainerDebugCommandTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ public function testGetDeprecationNoFile()
269269
$this->assertStringContainsString('[WARNING] The deprecation file does not exist', $tester->getDisplay());
270270
}
271271

272-
public static function provideIgnoreBackslashWhenFindingService()
272+
public static function provideIgnoreBackslashWhenFindingService(): array
273273
{
274274
return [
275275
[BackslashClass::class],
@@ -297,7 +297,7 @@ public function testComplete(array $input, array $expectedSuggestions, array $no
297297
}
298298
}
299299

300-
public static function provideCompletionSuggestions()
300+
public static function provideCompletionSuggestions(): iterable
301301
{
302302
$serviceId = 'console.command.container_debug';
303303
$hiddenServiceId = '.console.command.container_debug.lazy';

Tests/Functional/RouterDebugCommandTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function testComplete(array $input, array $expectedSuggestions)
9696
$this->assertSame($expectedSuggestions, $tester->complete($input));
9797
}
9898

99-
public static function provideCompletionSuggestions()
99+
public static function provideCompletionSuggestions(): iterable
100100
{
101101
yield 'option --format' => [
102102
['--format', ''],

0 commit comments

Comments
 (0)