11# Run these steps to update this file:
22sed -i 's/ *"\*\*\/Tests\/"//' composer.json
33composer u -o
4- SYMFONY_PATCH_TYPE_DECLARATIONS='force=2&php=8.0 ' php .github/patch-types.php
4+ SYMFONY_PATCH_TYPE_DECLARATIONS='force=2&php=8.1 ' php .github/patch-types.php
55head=$(sed '/^diff /Q' .github/expected-missing-return-types.diff)
6- (echo "$head" && echo && git diff -U2 composer.json src/) > .github/expected-missing-return-types.diff
6+ (echo "$head" && echo && git diff -U2 src/) > .github/expected-missing-return-types.diff
77git checkout composer.json src/
88
9- diff --git a/composer.json b/composer.json
10- index c7b7eac4c7..2b60fb6a19 100644
11- --- a/composer.json
12- +++ b/composer.json
13- @@ -180,5 +180,5 @@
14- ],
15- "exclude-from-classmap": [
16- - "**/Tests/"
17- +
18- ]
19- },
209diff --git a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php
2110index d68ae4c8b3..8e980a9e70 100644
2211--- a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php
@@ -60,6 +49,17 @@ index 697e34cb77..9a1e4c5618 100644
6049+ protected function filterResponse(object $response): Response
6150 {
6251 return $response;
52+ diff --git a/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php b/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php
53+ index 89d6adb70e..c569992efc 100644
54+ --- a/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php
55+ +++ b/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php
56+ @@ -108,5 +108,5 @@ class NodeBuilder implements NodeParentInterface
57+ * @return NodeDefinition&ParentNodeDefinitionInterface
58+ */
59+ - public function end()
60+ + public function end(): NodeDefinition&ParentNodeDefinitionInterface
61+ {
62+ return $this->parent;
6363diff --git a/src/Symfony/Component/Config/Definition/ConfigurationInterface.php b/src/Symfony/Component/Config/Definition/ConfigurationInterface.php
6464index 7b5d443fe6..d64ae0d024 100644
6565--- a/src/Symfony/Component/Config/Definition/ConfigurationInterface.php
@@ -156,7 +156,7 @@ index 6b1c6c5fbe..bb80ed461e 100644
156156+ public function isFresh(ResourceInterface $resource, int $timestamp): bool;
157157 }
158158diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php
159- index 0ed5649b8a..6c814bf82c 100644
159+ index c654b93790..ce744f5c6d 100644
160160--- a/src/Symfony/Component/Console/Application.php
161161+++ b/src/Symfony/Component/Console/Application.php
162162@@ -218,5 +218,5 @@ class Application implements ResetInterface
@@ -209,17 +209,17 @@ index 0ed5649b8a..6c814bf82c 100644
209209 {
210210 foreach ($command->getHelperSet() as $helper) {
211211diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php
212- index 0bd3426c07..b38caf989e 100644
212+ index e84307207a..bc503462c1 100644
213213--- a/src/Symfony/Component/Console/Command/Command.php
214214+++ b/src/Symfony/Component/Console/Command/Command.php
215- @@ -171 ,5 +171 ,5 @@ class Command
215+ @@ -187 ,5 +187 ,5 @@ class Command
216216 * @return bool
217217 */
218218- public function isEnabled()
219219+ public function isEnabled(): bool
220220 {
221221 return true;
222- @@ -197 ,5 +197 ,5 @@ class Command
222+ @@ -213 ,5 +213 ,5 @@ class Command
223223 * @see setCode()
224224 */
225225- protected function execute(InputInterface $input, OutputInterface $output)
@@ -297,7 +297,7 @@ index c2824f4578..032f5c2318 100644
297297 {
298298 if (\is_array($value)) {
299299diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php
300- index b9dd838898..3a8cb63eac 100644
300+ index f9820f5ede..d28a418429 100644
301301--- a/src/Symfony/Component/DependencyInjection/Container.php
302302+++ b/src/Symfony/Component/DependencyInjection/Container.php
303303@@ -108,5 +108,5 @@ class Container implements ContainerInterface, ResetInterface
@@ -308,7 +308,7 @@ index b9dd838898..3a8cb63eac 100644
308308 {
309309 return $this->parameterBag->get($name);
310310diff --git a/src/Symfony/Component/DependencyInjection/ContainerInterface.php b/src/Symfony/Component/DependencyInjection/ContainerInterface.php
311- index aa5d6b317e..31ffbca4ef 100644
311+ index cad44026c0..14cd192e07 100644
312312--- a/src/Symfony/Component/DependencyInjection/ContainerInterface.php
313313+++ b/src/Symfony/Component/DependencyInjection/ContainerInterface.php
314314@@ -53,5 +53,5 @@ interface ContainerInterface extends PsrContainerInterface
@@ -635,6 +635,17 @@ index 125b6eae50..ac327e8981 100644
635635+ public function createLockFromKey(Key $key, ?float $ttl = 300.0, bool $autoRelease = true): SharedLockInterface
636636 {
637637 $lock = new Lock($key, $this->store, $ttl, $autoRelease);
638+ diff --git a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsTransport.php b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsTransport.php
639+ index 297fccbd3f..4c47d95b38 100644
640+ --- a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsTransport.php
641+ +++ b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsTransport.php
642+ @@ -109,5 +109,5 @@ class AmazonSqsTransport implements TransportInterface, SetupableTransportInterf
643+ * @return MessageCountAwareInterface&ReceiverInterface
644+ */
645+ - private function getReceiver(): ReceiverInterface
646+ + private function getReceiver(): MessageCountAwareInterface&ReceiverInterface
647+ {
648+ return $this->receiver ??= new AmazonSqsReceiver($this->connection, $this->serializer);
638649diff --git a/src/Symfony/Component/OptionsResolver/OptionsResolver.php b/src/Symfony/Component/OptionsResolver/OptionsResolver.php
639650index 205c15b4cd..e93e460ed1 100644
640651--- a/src/Symfony/Component/OptionsResolver/OptionsResolver.php
@@ -720,10 +731,10 @@ index fbb37d9f94..522e0487a9 100644
720731+ public function isIndex(int $index): bool;
721732 }
722733diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
723- index cfffdb2f71..3e2261898a 100644
734+ index 972d169caa..0b6dae1abe 100644
724735--- a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
725736+++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
726- @@ -725 ,5 +725 ,5 @@ class PropertyAccessorTest extends TestCase
737+ @@ -743 ,5 +743 ,5 @@ class PropertyAccessorTest extends TestCase
727738 * @return mixed
728739 */
729740- public function getFoo()
@@ -923,7 +934,7 @@ index 7f86ed8d78..cf084423ec 100644
923934 {
924935 if (null !== $object = $this->extractObjectToPopulate($class, $context, self::OBJECT_TO_POPULATE)) {
925936diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php
926- index a8943113c4..2983dabd0f 100644
937+ index 1abdb634ce..d2e7f41562 100644
927938--- a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php
928939+++ b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php
929940@@ -138,5 +138,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
@@ -940,35 +951,35 @@ index a8943113c4..2983dabd0f 100644
940951+ public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
941952 {
942953 if (!isset($context['cache_key'])) {
943- @@ -279 ,5 +279 ,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
954+ @@ -280 ,5 +280 ,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
944955 * {@inheritdoc}
945956 */
946957- protected function instantiateObject(array &$data, string $class, array &$context, \ReflectionClass $reflectionClass, array|bool $allowedAttributes, string $format = null)
947958+ protected function instantiateObject(array &$data, string $class, array &$context, \ReflectionClass $reflectionClass, array|bool $allowedAttributes, string $format = null): object
948959 {
949960 if ($this->classDiscriminatorResolver && $mapping = $this->classDiscriminatorResolver->getMappingForClass($class)) {
950- @@ -341 ,5 +341 ,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
961+ @@ -342 ,5 +342 ,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
951962 * @return string[]
952963 */
953964- abstract protected function extractAttributes(object $object, string $format = null, array $context = []);
954965+ abstract protected function extractAttributes(object $object, string $format = null, array $context = []): array;
955966
956967 /**
957- @@ -348 ,5 +348 ,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
968+ @@ -349 ,5 +349 ,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
958969 * @return mixed
959970 */
960971- abstract protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []);
961972+ abstract protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []): mixed;
962973
963974 /**
964- @@ -355 ,5 +355 ,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
975+ @@ -356 ,5 +356 ,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
965976 * @param array $context
966977 */
967978- public function supportsDenormalization(mixed $data, string $type, string $format = null /*, array $context = [] */)
968979+ public function supportsDenormalization(mixed $data, string $type, string $format = null /*, array $context = [] */): bool
969980 {
970981 return class_exists($type) || (interface_exists($type, false) && $this->classDiscriminatorResolver && null !== $this->classDiscriminatorResolver->getMappingForClass($type));
971- @@ -363 ,5 +363 ,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
982+ @@ -364 ,5 +364 ,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
972983 * {@inheritdoc}
973984 */
974985- public function denormalize(mixed $data, string $type, string $format = null, array $context = [])
0 commit comments