@@ -4,9 +4,10 @@ composer u -o
4
4
SYMFONY_PATCH_TYPE_DECLARATIONS='force=2&php=8.0' php .github/patch-types.php
5
5
head=$(sed '/^diff /Q' .github/expected-missing-return-types.diff)
6
6
(echo "$head" && echo && git diff -U2 composer.json src/) > .github/expected-missing-return-types.diff
7
+ git checkout composer.json src/
7
8
8
9
diff --git a/composer.json b/composer.json
9
- index 978743d34d..1f185f682c 100644
10
+ index c7b7eac4c7..2b60fb6a19 100644
10
11
--- a/composer.json
11
12
+++ b/composer.json
12
13
@@ -180,5 +180,5 @@
@@ -155,7 +156,7 @@ index 6b1c6c5fbe..bb80ed461e 100644
155
156
+ public function isFresh(ResourceInterface $resource, int $timestamp): bool;
156
157
}
157
158
diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php
158
- index 09234f5eb5..24d995ad6d 100644
159
+ index 0ed5649b8a..6c814bf82c 100644
159
160
--- a/src/Symfony/Component/Console/Application.php
160
161
+++ b/src/Symfony/Component/Console/Application.php
161
162
@@ -218,5 +218,5 @@ class Application implements ResetInterface
@@ -208,7 +209,7 @@ index 09234f5eb5..24d995ad6d 100644
208
209
{
209
210
foreach ($command->getHelperSet() as $helper) {
210
211
diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php
211
- index e69bae0982..3390628d0d 100644
212
+ index 0bd3426c07..b38caf989e 100644
212
213
--- a/src/Symfony/Component/Console/Command/Command.php
213
214
+++ b/src/Symfony/Component/Console/Command/Command.php
214
215
@@ -171,5 +171,5 @@ class Command
@@ -236,32 +237,32 @@ index 1d2b7bfb84..cb1f66152d 100644
236
237
+ public function getName(): string;
237
238
}
238
239
diff --git a/src/Symfony/Component/Console/Input/InputInterface.php b/src/Symfony/Component/Console/Input/InputInterface.php
239
- index 024da1884e..943790e875 100644
240
+ index 3af991a76f..742e2508f3 100644
240
241
--- a/src/Symfony/Component/Console/Input/InputInterface.php
241
242
+++ b/src/Symfony/Component/Console/Input/InputInterface.php
242
- @@ -54 ,5 +54 ,5 @@ interface InputInterface
243
+ @@ -57 ,5 +57 ,5 @@ interface InputInterface
243
244
* @return mixed
244
245
*/
245
246
- public function getParameterOption(string|array $values, string|bool|int|float|array|null $default = false, bool $onlyParams = false);
246
247
+ public function getParameterOption(string|array $values, string|bool|int|float|array|null $default = false, bool $onlyParams = false): mixed;
247
248
248
249
/**
249
- @@ -84 ,5 +84 ,5 @@ interface InputInterface
250
+ @@ -87 ,5 +87 ,5 @@ interface InputInterface
250
251
* @throws InvalidArgumentException When argument given doesn't exist
251
252
*/
252
253
- public function getArgument(string $name);
253
254
+ public function getArgument(string $name): mixed;
254
255
255
256
/**
256
- @@ -112 ,5 +112 ,5 @@ interface InputInterface
257
+ @@ -115 ,5 +115 ,5 @@ interface InputInterface
257
258
* @throws InvalidArgumentException When option given doesn't exist
258
259
*/
259
260
- public function getOption(string $name);
260
261
+ public function getOption(string $name): mixed;
261
262
262
263
/**
263
264
diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php b/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php
264
- index e9fa5a6808..016e9d893a 100644
265
+ index c2824f4578..032f5c2318 100644
265
266
--- a/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php
266
267
+++ b/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php
267
268
@@ -71,5 +71,5 @@ abstract class AbstractRecursivePass implements CompilerPassInterface
@@ -383,7 +384,7 @@ index 479aeef880..272954c082 100644
383
384
+ public function getFunctions(): array;
384
385
}
385
386
diff --git a/src/Symfony/Component/Form/AbstractExtension.php b/src/Symfony/Component/Form/AbstractExtension.php
386
- index 5a077a42a6..62a234b116 100644
387
+ index 79d61e8bc0..7f34d95d84 100644
387
388
--- a/src/Symfony/Component/Form/AbstractExtension.php
388
389
+++ b/src/Symfony/Component/Form/AbstractExtension.php
389
390
@@ -114,5 +114,5 @@ abstract class AbstractExtension implements FormExtensionInterface
@@ -525,10 +526,10 @@ index 2f442cb536..d98909cfae 100644
525
526
+ public function warmUp(string $cacheDir): array;
526
527
}
527
528
diff --git a/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php
528
- index 1289cf0ea9..dabeec97ee 100644
529
+ index 3a3be3af49..971560c07b 100644
529
530
--- a/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php
530
531
+++ b/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php
531
- @@ -58 ,5 +58 ,5 @@ abstract class DataCollector implements DataCollectorInterface
532
+ @@ -59 ,5 +59 ,5 @@ abstract class DataCollector implements DataCollectorInterface
532
533
* @return callable[] The casters to add to the cloner
533
534
*/
534
535
- protected function getCasters()
@@ -546,7 +547,7 @@ index 1cb865fd66..f6f4efe7a7 100644
546
547
+ public function getName(): string;
547
548
}
548
549
diff --git a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php
549
- index eeec55593f..c12df944fc 100644
550
+ index cf0e243c6b..292b907ea8 100644
550
551
--- a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php
551
552
+++ b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php
552
553
@@ -448,5 +448,5 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
@@ -557,7 +558,7 @@ index eeec55593f..c12df944fc 100644
557
558
{
558
559
$this->surrogate?->addSurrogateCapability($request);
559
560
diff --git a/src/Symfony/Component/HttpKernel/HttpKernelBrowser.php b/src/Symfony/Component/HttpKernel/HttpKernelBrowser.php
560
- index fc70d8970d..9dde6d1f93 100644
561
+ index 1557da575a..7e5a2a9859 100644
561
562
--- a/src/Symfony/Component/HttpKernel/HttpKernelBrowser.php
562
563
+++ b/src/Symfony/Component/HttpKernel/HttpKernelBrowser.php
563
564
@@ -61,5 +61,5 @@ class HttpKernelBrowser extends AbstractBrowser
@@ -610,23 +611,6 @@ index 125b6eae50..ac327e8981 100644
610
611
+ public function createLockFromKey(Key $key, ?float $ttl = 300.0, bool $autoRelease = true): SharedLockInterface
611
612
{
612
613
$lock = new Lock($key, $this->store, $ttl, $autoRelease);
613
- diff --git a/src/Symfony/Component/Messenger/Envelope.php b/src/Symfony/Component/Messenger/Envelope.php
614
- index bb1194ad1b..27731b9cb0 100644
615
- --- a/src/Symfony/Component/Messenger/Envelope.php
616
- +++ b/src/Symfony/Component/Messenger/Envelope.php
617
- @@ -13,4 +13,5 @@ namespace Symfony\Component\Messenger;
618
-
619
- use Symfony\Component\Messenger\Stamp\StampInterface;
620
- + use Symfony\Component\Messenger\Stamp\StampInterface as TStamp;
621
-
622
- /**
623
- @@ -101,5 +102,5 @@ final class Envelope
624
- * @return TStamp|null
625
- */
626
- - public function last(string $stampFqcn): ?StampInterface
627
- + public function last(string $stampFqcn): ?TStamp
628
- {
629
- return isset($this->stamps[$stampFqcn]) ? end($this->stamps[$stampFqcn]) : null;
630
614
diff --git a/src/Symfony/Component/OptionsResolver/OptionsResolver.php b/src/Symfony/Component/OptionsResolver/OptionsResolver.php
631
615
index 205c15b4cd..e93e460ed1 100644
632
616
--- a/src/Symfony/Component/OptionsResolver/OptionsResolver.php
@@ -771,7 +755,7 @@ index 2dd0e5efbf..95e01d8955 100644
771
755
{
772
756
$name = str_replace('\\', '_', $class->name).'_'.$method->name;
773
757
diff --git a/src/Symfony/Component/Routing/Router.php b/src/Symfony/Component/Routing/Router.php
774
- index be653e4f00..e46300d474 100644
758
+ index 83c10427a1..e113d4a194 100644
775
759
--- a/src/Symfony/Component/Routing/Router.php
776
760
+++ b/src/Symfony/Component/Routing/Router.php
777
761
@@ -178,5 +178,5 @@ class Router implements RouterInterface, RequestMatcherInterface
@@ -813,7 +797,7 @@ index 7e401c3ff3..6b446ff376 100644
813
797
+ public function vote(TokenInterface $token, mixed $subject, array $attributes): int;
814
798
}
815
799
diff --git a/src/Symfony/Component/Security/Core/Exception/AuthenticationException.php b/src/Symfony/Component/Security/Core/Exception/AuthenticationException.php
816
- index 9e2b02b603..c6a753f1f7 100644
800
+ index 298bc78cd9..3ef4176dd8 100644
817
801
--- a/src/Symfony/Component/Security/Core/Exception/AuthenticationException.php
818
802
+++ b/src/Symfony/Component/Security/Core/Exception/AuthenticationException.php
819
803
@@ -89,5 +89,5 @@ class AuthenticationException extends RuntimeException
@@ -852,7 +836,7 @@ index 91271d14a3..100c2fb549 100644
852
836
+ public function start(Request $request, AuthenticationException $authException = null): Response;
853
837
}
854
838
diff --git a/src/Symfony/Component/Security/Http/Firewall.php b/src/Symfony/Component/Security/Http/Firewall.php
855
- index 546b77d22f..24038d4b94 100644
839
+ index 0c313f8f09..acfc9f4b88 100644
856
840
--- a/src/Symfony/Component/Security/Http/Firewall.php
857
841
+++ b/src/Symfony/Component/Security/Http/Firewall.php
858
842
@@ -106,5 +106,5 @@ class Firewall implements EventSubscriberInterface
@@ -873,7 +857,7 @@ index 480ea8ad6b..fa43d6a6e9 100644
873
857
+ public function getListeners(Request $request): array;
874
858
}
875
859
diff --git a/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php b/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php
876
- index 84a84ad1f3..6f66b6d32a 100644
860
+ index f38069e471..0966eb3e89 100644
877
861
--- a/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php
878
862
+++ b/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php
879
863
@@ -35,5 +35,5 @@ interface DecoderInterface
@@ -883,11 +867,11 @@ index 84a84ad1f3..6f66b6d32a 100644
883
867
+ public function decode(string $data, string $format, array $context = []): mixed;
884
868
885
869
/**
886
- @@ -44 ,4 +44 ,4 @@ interface DecoderInterface
870
+ @@ -45 ,4 +45 ,4 @@ interface DecoderInterface
887
871
* @return bool
888
872
*/
889
- - public function supportsDecoding(string $format);
890
- + public function supportsDecoding(string $format): bool;
873
+ - public function supportsDecoding(string $format /*, array $context = [] */ );
874
+ + public function supportsDecoding(string $format /*, array $context = [] */ ): bool;
891
875
}
892
876
diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php
893
877
index 7f86ed8d78..cf084423ec 100644
@@ -915,59 +899,60 @@ index 7f86ed8d78..cf084423ec 100644
915
899
{
916
900
if (null !== $object = $this->extractObjectToPopulate($class, $context, self::OBJECT_TO_POPULATE)) {
917
901
diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php
918
- index 3e1e7edc8e..e025b2bc4a 100644
902
+ index a8943113c4..2983dabd0f 100644
919
903
--- a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php
920
904
+++ b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php
921
- @@ -136 ,5 +136 ,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
922
- * {@inheritdoc}
905
+ @@ -138 ,5 +138 ,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
906
+ * @param array $context
923
907
*/
924
- - public function supportsNormalization(mixed $data, string $format = null)
925
- + public function supportsNormalization(mixed $data, string $format = null): bool
908
+ - public function supportsNormalization(mixed $data, string $format = null /*, array $context = [] */ )
909
+ + public function supportsNormalization(mixed $data, string $format = null /*, array $context = [] */ ): bool
926
910
{
927
911
return \is_object($data) && !$data instanceof \Traversable;
928
- @@ -144 ,5 +144 ,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
912
+ @@ -146 ,5 +146 ,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
929
913
* {@inheritdoc}
930
914
*/
931
915
- public function normalize(mixed $object, string $format = null, array $context = [])
932
916
+ public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
933
917
{
934
918
if (!isset($context['cache_key'])) {
935
- @@ -277 ,5 +277 ,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
919
+ @@ -279 ,5 +279 ,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
936
920
* {@inheritdoc}
937
921
*/
938
922
- protected function instantiateObject(array &$data, string $class, array &$context, \ReflectionClass $reflectionClass, array|bool $allowedAttributes, string $format = null)
939
923
+ protected function instantiateObject(array &$data, string $class, array &$context, \ReflectionClass $reflectionClass, array|bool $allowedAttributes, string $format = null): object
940
924
{
941
925
if ($this->classDiscriminatorResolver && $mapping = $this->classDiscriminatorResolver->getMappingForClass($class)) {
942
- @@ -339 ,5 +339 ,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
926
+ @@ -341 ,5 +341 ,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
943
927
* @return string[]
944
928
*/
945
929
- abstract protected function extractAttributes(object $object, string $format = null, array $context = []);
946
930
+ abstract protected function extractAttributes(object $object, string $format = null, array $context = []): array;
947
931
948
932
/**
949
- @@ -346,10 +346,10 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
933
+ @@ -348,5 +348,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
950
934
* @return mixed
951
935
*/
952
936
- abstract protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []);
953
937
+ abstract protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []): mixed;
954
938
955
939
/**
956
- * {@inheritdoc}
940
+ @@ -355,5 +355,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
941
+ * @param array $context
957
942
*/
958
- - public function supportsDenormalization(mixed $data, string $type, string $format = null)
959
- + public function supportsDenormalization(mixed $data, string $type, string $format = null): bool
943
+ - public function supportsDenormalization(mixed $data, string $type, string $format = null /*, array $context = [] */ )
944
+ + public function supportsDenormalization(mixed $data, string $type, string $format = null /*, array $context = [] */ ): bool
960
945
{
961
946
return class_exists($type) || (interface_exists($type, false) && $this->classDiscriminatorResolver && null !== $this->classDiscriminatorResolver->getMappingForClass($type));
962
- @@ -359 ,5 +359 ,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
947
+ @@ -363 ,5 +363 ,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
963
948
* {@inheritdoc}
964
949
*/
965
950
- public function denormalize(mixed $data, string $type, string $format = null, array $context = [])
966
951
+ public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed
967
952
{
968
953
if (!isset($context['cache_key'])) {
969
954
diff --git a/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php b/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php
970
- index 5e94400b80..726d89cbb1 100644
955
+ index 1c708738a1..3b6c9d5056 100644
971
956
--- a/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php
972
957
+++ b/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php
973
958
@@ -45,5 +45,5 @@ interface DenormalizerInterface
@@ -977,14 +962,14 @@ index 5e94400b80..726d89cbb1 100644
977
962
+ public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed;
978
963
979
964
/**
980
- @@ -56 ,4 +56 ,4 @@ interface DenormalizerInterface
965
+ @@ -57 ,4 +57 ,4 @@ interface DenormalizerInterface
981
966
* @return bool
982
967
*/
983
- - public function supportsDenormalization(mixed $data, string $type, string $format = null);
984
- + public function supportsDenormalization(mixed $data, string $type, string $format = null): bool;
968
+ - public function supportsDenormalization(mixed $data, string $type, string $format = null /*, array $context = [] */ );
969
+ + public function supportsDenormalization(mixed $data, string $type, string $format = null /*, array $context = [] */ ): bool;
985
970
}
986
971
diff --git a/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php b/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php
987
- index 30eeafb47b..a7a60ad2f2 100644
972
+ index 741f19e50b..acf3be931b 100644
988
973
--- a/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php
989
974
+++ b/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php
990
975
@@ -37,5 +37,5 @@ interface NormalizerInterface
@@ -994,11 +979,11 @@ index 30eeafb47b..a7a60ad2f2 100644
994
979
+ public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null;
995
980
996
981
/**
997
- @@ -47 ,4 +47 ,4 @@ interface NormalizerInterface
982
+ @@ -48 ,4 +48 ,4 @@ interface NormalizerInterface
998
983
* @return bool
999
984
*/
1000
- - public function supportsNormalization(mixed $data, string $format = null);
1001
- + public function supportsNormalization(mixed $data, string $format = null): bool;
985
+ - public function supportsNormalization(mixed $data, string $format = null /*, array $context = [] */ );
986
+ + public function supportsNormalization(mixed $data, string $format = null /*, array $context = [] */ ): bool;
1002
987
}
1003
988
diff --git a/src/Symfony/Component/Templating/Helper/HelperInterface.php b/src/Symfony/Component/Templating/Helper/HelperInterface.php
1004
989
index 5dade65db5..db0d0a00ea 100644
0 commit comments