@@ -22,7 +22,7 @@ diff --git a/src/Symfony/Component/BrowserKit/AbstractBrowser.php b/src/Symfony/
22
22
*/
23
23
- abstract protected function doRequest(object $request);
24
24
+ abstract protected function doRequest(object $request): object;
25
-
25
+
26
26
/**
27
27
@@ -451,5 +451,5 @@ abstract class AbstractBrowser
28
28
* @throws LogicException When this abstract class is not implemented
@@ -146,21 +146,21 @@ diff --git a/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterf
146
146
*/
147
147
- public function load(array $configs, ContainerBuilder $container);
148
148
+ public function load(array $configs, ContainerBuilder $container): void;
149
-
149
+
150
150
/**
151
151
@@ -37,5 +37,5 @@ interface ExtensionInterface
152
152
* @return string
153
153
*/
154
154
- public function getNamespace();
155
155
+ public function getNamespace(): string;
156
-
156
+
157
157
/**
158
158
@@ -44,5 +44,5 @@ interface ExtensionInterface
159
159
* @return string|false
160
160
*/
161
161
- public function getXsdValidationBasePath();
162
162
+ public function getXsdValidationBasePath(): string|false;
163
-
163
+
164
164
/**
165
165
@@ -53,4 +53,4 @@ interface ExtensionInterface
166
166
* @return string
@@ -189,13 +189,13 @@ diff --git a/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php
189
189
diff --git a/src/Symfony/Component/ExpressionLanguage/ExpressionLanguage.php b/src/Symfony/Component/ExpressionLanguage/ExpressionLanguage.php
190
190
--- a/src/Symfony/Component/ExpressionLanguage/ExpressionLanguage.php
191
191
+++ b/src/Symfony/Component/ExpressionLanguage/ExpressionLanguage.php
192
- @@ -139 ,5 +139 ,5 @@ class ExpressionLanguage
192
+ @@ -149 ,5 +149 ,5 @@ class ExpressionLanguage
193
193
* @return void
194
194
*/
195
195
- protected function registerFunctions()
196
196
+ protected function registerFunctions(): void
197
197
{
198
- $this->addFunction(ExpressionFunction::fromPhp( 'constant')) ;
198
+ $basicPhpFunctions = [ 'constant', 'min', 'max'] ;
199
199
diff --git a/src/Symfony/Component/Form/AbstractType.php b/src/Symfony/Component/Form/AbstractType.php
200
200
--- a/src/Symfony/Component/Form/AbstractType.php
201
201
+++ b/src/Symfony/Component/Form/AbstractType.php
@@ -249,35 +249,35 @@ diff --git a/src/Symfony/Component/Form/FormTypeInterface.php b/src/Symfony/Comp
249
249
*/
250
250
- public function getParent();
251
251
+ public function getParent(): ?string;
252
-
252
+
253
253
/**
254
254
@@ -34,5 +34,5 @@ interface FormTypeInterface
255
255
* @return void
256
256
*/
257
257
- public function configureOptions(OptionsResolver $resolver);
258
258
+ public function configureOptions(OptionsResolver $resolver): void;
259
-
259
+
260
260
/**
261
261
@@ -48,5 +48,5 @@ interface FormTypeInterface
262
262
* @see FormTypeExtensionInterface::buildForm()
263
263
*/
264
264
- public function buildForm(FormBuilderInterface $builder, array $options);
265
265
+ public function buildForm(FormBuilderInterface $builder, array $options): void;
266
-
266
+
267
267
/**
268
268
@@ -66,5 +66,5 @@ interface FormTypeInterface
269
269
* @see FormTypeExtensionInterface::buildView()
270
270
*/
271
271
- public function buildView(FormView $view, FormInterface $form, array $options);
272
272
+ public function buildView(FormView $view, FormInterface $form, array $options): void;
273
-
273
+
274
274
/**
275
275
@@ -85,5 +85,5 @@ interface FormTypeInterface
276
276
* @see FormTypeExtensionInterface::finishView()
277
277
*/
278
278
- public function finishView(FormView $view, FormInterface $form, array $options);
279
279
+ public function finishView(FormView $view, FormInterface $form, array $options): void;
280
-
280
+
281
281
/**
282
282
@@ -95,4 +95,4 @@ interface FormTypeInterface
283
283
* @return string
@@ -324,26 +324,26 @@ diff --git a/src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php b/src/S
324
324
*/
325
325
- public function boot();
326
326
+ public function boot(): void;
327
-
327
+
328
328
/**
329
329
@@ -35,5 +35,5 @@ interface BundleInterface
330
330
* @return void
331
331
*/
332
332
- public function shutdown();
333
333
+ public function shutdown(): void;
334
-
334
+
335
335
/**
336
336
@@ -44,5 +44,5 @@ interface BundleInterface
337
337
* @return void
338
338
*/
339
339
- public function build(ContainerBuilder $container);
340
340
+ public function build(ContainerBuilder $container): void;
341
-
341
+
342
342
/**
343
343
diff --git a/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php
344
344
--- a/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php
345
345
+++ b/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php
346
- @@ -101 ,5 +101 ,5 @@ abstract class DataCollector implements DataCollectorInterface
346
+ @@ -113 ,5 +113 ,5 @@ abstract class DataCollector implements DataCollectorInterface
347
347
* @return void
348
348
*/
349
349
- public function reset()
@@ -358,7 +358,7 @@ diff --git a/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterfa
358
358
*/
359
359
- public function collect(Request $request, Response $response, ?\Throwable $exception = null);
360
360
+ public function collect(Request $request, Response $response, ?\Throwable $exception = null): void;
361
-
361
+
362
362
/**
363
363
@@ -35,4 +35,4 @@ interface DataCollectorInterface extends ResetInterface
364
364
* @return string
@@ -383,38 +383,38 @@ diff --git a/src/Symfony/Component/HttpKernel/KernelInterface.php b/src/Symfony/
383
383
*/
384
384
- public function registerContainerConfiguration(LoaderInterface $loader);
385
385
+ public function registerContainerConfiguration(LoaderInterface $loader): void;
386
-
386
+
387
387
/**
388
388
@@ -44,5 +44,5 @@ interface KernelInterface extends HttpKernelInterface
389
389
* @return void
390
390
*/
391
391
- public function boot();
392
392
+ public function boot(): void;
393
-
393
+
394
394
/**
395
395
@@ -53,5 +53,5 @@ interface KernelInterface extends HttpKernelInterface
396
396
* @return void
397
397
*/
398
398
- public function shutdown();
399
399
+ public function shutdown(): void;
400
-
400
+
401
401
/**
402
402
diff --git a/src/Symfony/Component/Routing/Loader/AttributeClassLoader.php b/src/Symfony/Component/Routing/Loader/AttributeClassLoader.php
403
403
--- a/src/Symfony/Component/Routing/Loader/AttributeClassLoader.php
404
404
+++ b/src/Symfony/Component/Routing/Loader/AttributeClassLoader.php
405
- @@ -234 ,5 +234 ,5 @@ abstract class AttributeClassLoader implements LoaderInterface
405
+ @@ -236 ,5 +236 ,5 @@ abstract class AttributeClassLoader implements LoaderInterface
406
406
* @return string
407
407
*/
408
408
- protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method)
409
409
+ protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method): string
410
410
{
411
411
$name = str_replace('\\', '_', $class->name).'_'.$method->name;
412
- @@ -333 ,5 +333 ,5 @@ abstract class AttributeClassLoader implements LoaderInterface
412
+ @@ -335 ,5 +335 ,5 @@ abstract class AttributeClassLoader implements LoaderInterface
413
413
* @return void
414
414
*/
415
415
- abstract protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, object $annot);
416
416
+ abstract protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, object $annot): void;
417
-
417
+
418
418
/**
419
419
diff --git a/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php b/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php
420
420
--- a/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php
@@ -424,21 +424,21 @@ diff --git a/src/Symfony/Component/Security/Core/Authentication/RememberMe/Token
424
424
*/
425
425
- public function loadTokenBySeries(string $series);
426
426
+ public function loadTokenBySeries(string $series): PersistentTokenInterface;
427
-
427
+
428
428
/**
429
429
@@ -35,5 +35,5 @@ interface TokenProviderInterface
430
430
* @return void
431
431
*/
432
432
- public function deleteTokenBySeries(string $series);
433
433
+ public function deleteTokenBySeries(string $series): void;
434
-
434
+
435
435
/**
436
436
@@ -44,5 +44,5 @@ interface TokenProviderInterface
437
437
* @throws TokenNotFoundException if the token is not found
438
438
*/
439
439
- public function updateToken(string $series, #[\SensitiveParameter] string $tokenValue, \DateTimeInterface $lastUsed);
440
440
+ public function updateToken(string $series, #[\SensitiveParameter] string $tokenValue, \DateTimeInterface $lastUsed): void;
441
-
441
+
442
442
/**
443
443
@@ -51,4 +51,4 @@ interface TokenProviderInterface
444
444
* @return void
@@ -485,7 +485,7 @@ diff --git a/src/Symfony/Component/Translation/Extractor/ExtractorInterface.php
485
485
*/
486
486
- public function extract(string|iterable $resource, MessageCatalogue $catalogue);
487
487
+ public function extract(string|iterable $resource, MessageCatalogue $catalogue): void;
488
-
488
+
489
489
/**
490
490
@@ -36,4 +36,4 @@ interface ExtractorInterface
491
491
* @return void
@@ -501,7 +501,7 @@ diff --git a/src/Symfony/Component/Validator/ConstraintValidatorInterface.php b/
501
501
*/
502
502
- public function initialize(ExecutionContextInterface $context);
503
503
+ public function initialize(ExecutionContextInterface $context): void;
504
-
504
+
505
505
/**
506
506
@@ -31,4 +31,4 @@ interface ConstraintValidatorInterface
507
507
* @return void
@@ -518,6 +518,23 @@ diff --git a/src/Symfony/Component/VarDumper/Dumper/DataDumperInterface.php b/sr
518
518
- public function dump(Data $data);
519
519
+ public function dump(Data $data): ?string;
520
520
}
521
+ diff --git a/src/Symfony/Component/VarExporter/Tests/ProxyHelperTest.php b/src/Symfony/Component/VarExporter/Tests/ProxyHelperTest.php
522
+ --- a/src/Symfony/Component/VarExporter/Tests/ProxyHelperTest.php
523
+ +++ b/src/Symfony/Component/VarExporter/Tests/ProxyHelperTest.php
524
+ @@ -172,5 +172,5 @@ class ProxyHelperTest extends TestCase
525
+ {
526
+ yield 'not type hinted __unserialize method' => [new class() {
527
+ - public function __unserialize($array)
528
+ + public function __unserialize($array): void
529
+ {
530
+ }
531
+ @@ -192,5 +192,5 @@ class ProxyHelperTest extends TestCase
532
+
533
+ yield 'type hinted __unserialize method' => [new class() {
534
+ - public function __unserialize(array $array)
535
+ + public function __unserialize(array $array): void
536
+ {
537
+ }
521
538
diff --git a/src/Symfony/Contracts/Translation/LocaleAwareInterface.php b/src/Symfony/Contracts/Translation/LocaleAwareInterface.php
522
539
--- a/src/Symfony/Contracts/Translation/LocaleAwareInterface.php
523
540
+++ b/src/Symfony/Contracts/Translation/LocaleAwareInterface.php
@@ -526,7 +543,7 @@ diff --git a/src/Symfony/Contracts/Translation/LocaleAwareInterface.php b/src/Sy
526
543
*/
527
544
- public function setLocale(string $locale);
528
545
+ public function setLocale(string $locale): void;
529
-
546
+
530
547
/**
531
548
diff --git a/src/Symfony/Contracts/Translation/TranslatorTrait.php b/src/Symfony/Contracts/Translation/TranslatorTrait.php
532
549
--- a/src/Symfony/Contracts/Translation/TranslatorTrait.php
0 commit comments