Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4568571

Browse files
Merge remote-tracking branch 'upstream/6.1' into form_text_type_stringable_upgrade
2 parents 02257d8 + 5c37c1f commit 4568571

File tree

358 files changed

+3574
-686
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

358 files changed

+3574
-686
lines changed

.appveyor.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ install:
2222
- cd ext
2323
- appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php_apcu-5.1.21-8.0-ts-vs16-x86.zip
2424
- 7z x php_apcu-5.1.21-8.0-ts-vs16-x86.zip -y >nul
25+
- appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php_redis-5.3.5-8.0-ts-vs16-x86.zip
26+
- 7z x php_redis-5.3.5-8.0-ts-vs16-x86.zip -y >nul
2527
- cd ..
2628
- copy /Y php.ini-development php.ini-min
2729
- echo memory_limit=-1 >> php.ini-min
@@ -37,6 +39,7 @@ install:
3739
- echo opcache.enable_cli=1 >> php.ini-max
3840
- echo extension=php_openssl.dll >> php.ini-max
3941
- echo extension=php_apcu.dll >> php.ini-max
42+
- echo extension=php_redis.dll >> php.ini-max
4043
- echo apc.enable_cli=1 >> php.ini-max
4144
- echo extension=php_intl.dll >> php.ini-max
4245
- echo extension=php_mbstring.dll >> php.ini-max
@@ -55,6 +58,7 @@ install:
5558
- SET COMPOSER_ROOT_VERSION=%SYMFONY_VERSION%.x-dev
5659
- php composer.phar update --no-progress --ansi
5760
- php phpunit install
61+
- choco install memurai-developer
5862

5963
test_script:
6064
- SET X=0

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Additionally (see https://symfony.com/releases):
1515
- Always add tests and ensure they pass.
1616
- Bug fixes must be submitted against the lowest maintained branch where they apply
1717
(lowest branches are regularly merged to upper ones so they get the fixes too.)
18-
- Features and deprecations must be submitted against branch 5.x.
18+
- Features and deprecations must be submitted against the latest branch.
1919
- Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
2020
- Never break backward compatibility (see https://symfony.com/bc).
2121
-->

.github/expected-missing-return-types.diff

Lines changed: 52 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ composer u -o
44
SYMFONY_PATCH_TYPE_DECLARATIONS='force=2&php=8.0' php .github/patch-types.php
55
head=$(sed '/^diff /Q' .github/expected-missing-return-types.diff)
66
(echo "$head" && echo && git diff -U2 composer.json src/) > .github/expected-missing-return-types.diff
7+
git checkout composer.json src/
78

89
diff --git a/composer.json b/composer.json
9-
index 1750d55ee2..c18494167a 100644
10+
index c7b7eac4c7..2b60fb6a19 100644
1011
--- a/composer.json
1112
+++ b/composer.json
12-
@@ -175,5 +175,5 @@
13+
@@ -180,5 +180,5 @@
1314
],
1415
"exclude-from-classmap": [
1516
- "**/Tests/"
@@ -236,32 +237,32 @@ index 1d2b7bfb84..cb1f66152d 100644
236237
+ public function getName(): string;
237238
}
238239
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
240241
--- a/src/Symfony/Component/Console/Input/InputInterface.php
241242
+++ b/src/Symfony/Component/Console/Input/InputInterface.php
242-
@@ -54,5 +54,5 @@ interface InputInterface
243+
@@ -57,5 +57,5 @@ interface InputInterface
243244
* @return mixed
244245
*/
245246
- public function getParameterOption(string|array $values, string|bool|int|float|array|null $default = false, bool $onlyParams = false);
246247
+ public function getParameterOption(string|array $values, string|bool|int|float|array|null $default = false, bool $onlyParams = false): mixed;
247248

248249
/**
249-
@@ -84,5 +84,5 @@ interface InputInterface
250+
@@ -87,5 +87,5 @@ interface InputInterface
250251
* @throws InvalidArgumentException When argument given doesn't exist
251252
*/
252253
- public function getArgument(string $name);
253254
+ public function getArgument(string $name): mixed;
254255

255256
/**
256-
@@ -112,5 +112,5 @@ interface InputInterface
257+
@@ -115,5 +115,5 @@ interface InputInterface
257258
* @throws InvalidArgumentException When option given doesn't exist
258259
*/
259260
- public function getOption(string $name);
260261
+ public function getOption(string $name): mixed;
261262

262263
/**
263264
diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php b/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php
264-
index 326d8d4f5f..e62124c7af 100644
265+
index c2824f4578..032f5c2318 100644
265266
--- a/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php
266267
+++ b/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php
267268
@@ -71,5 +71,5 @@ abstract class AbstractRecursivePass implements CompilerPassInterface
@@ -557,7 +558,7 @@ index cf0e243c6b..292b907ea8 100644
557558
{
558559
$this->surrogate?->addSurrogateCapability($request);
559560
diff --git a/src/Symfony/Component/HttpKernel/HttpKernelBrowser.php b/src/Symfony/Component/HttpKernel/HttpKernelBrowser.php
560-
index 3ecc2c739c..d50834b6d9 100644
561+
index 1557da575a..7e5a2a9859 100644
561562
--- a/src/Symfony/Component/HttpKernel/HttpKernelBrowser.php
562563
+++ b/src/Symfony/Component/HttpKernel/HttpKernelBrowser.php
563564
@@ -61,5 +61,5 @@ class HttpKernelBrowser extends AbstractBrowser
@@ -610,23 +611,6 @@ index 125b6eae50..ac327e8981 100644
610611
+ public function createLockFromKey(Key $key, ?float $ttl = 300.0, bool $autoRelease = true): SharedLockInterface
611612
{
612613
$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;
630614
diff --git a/src/Symfony/Component/OptionsResolver/OptionsResolver.php b/src/Symfony/Component/OptionsResolver/OptionsResolver.php
631615
index 205c15b4cd..e93e460ed1 100644
632616
--- a/src/Symfony/Component/OptionsResolver/OptionsResolver.php
@@ -711,6 +695,17 @@ index fbb37d9f94..522e0487a9 100644
711695
- public function isIndex(int $index);
712696
+ public function isIndex(int $index): bool;
713697
}
698+
diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
699+
index cfffdb2f71..3e2261898a 100644
700+
--- a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
701+
+++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
702+
@@ -725,5 +725,5 @@ class PropertyAccessorTest extends TestCase
703+
* @return mixed
704+
*/
705+
- public function getFoo()
706+
+ public function getFoo(): mixed
707+
{
708+
return $this->foo;
714709
diff --git a/src/Symfony/Component/PropertyInfo/PropertyAccessExtractorInterface.php b/src/Symfony/Component/PropertyInfo/PropertyAccessExtractorInterface.php
715710
index f9ee787130..61f8b6d5be 100644
716711
--- a/src/Symfony/Component/PropertyInfo/PropertyAccessExtractorInterface.php
@@ -862,7 +857,7 @@ index 480ea8ad6b..fa43d6a6e9 100644
862857
+ public function getListeners(Request $request): array;
863858
}
864859
diff --git a/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php b/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php
865-
index 84a84ad1f3..6f66b6d32a 100644
860+
index f38069e471..0966eb3e89 100644
866861
--- a/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php
867862
+++ b/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php
868863
@@ -35,5 +35,5 @@ interface DecoderInterface
@@ -872,14 +867,14 @@ index 84a84ad1f3..6f66b6d32a 100644
872867
+ public function decode(string $data, string $format, array $context = []): mixed;
873868

874869
/**
875-
@@ -44,4 +44,4 @@ interface DecoderInterface
870+
@@ -45,4 +45,4 @@ interface DecoderInterface
876871
* @return bool
877872
*/
878-
- public function supportsDecoding(string $format);
879-
+ public function supportsDecoding(string $format): bool;
873+
- public function supportsDecoding(string $format /*, array $context = [] */);
874+
+ public function supportsDecoding(string $format /*, array $context = [] */): bool;
880875
}
881876
diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php
882-
index b0a1f3218b..893fe59e2f 100644
877+
index 7f86ed8d78..cf084423ec 100644
883878
--- a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php
884879
+++ b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php
885880
@@ -223,5 +223,5 @@ abstract class AbstractNormalizer implements NormalizerInterface, DenormalizerIn
@@ -904,59 +899,60 @@ index b0a1f3218b..893fe59e2f 100644
904899
{
905900
if (null !== $object = $this->extractObjectToPopulate($class, $context, self::OBJECT_TO_POPULATE)) {
906901
diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php
907-
index 3e1e7edc8e..e025b2bc4a 100644
902+
index a8943113c4..2983dabd0f 100644
908903
--- a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php
909904
+++ b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php
910-
@@ -136,5 +136,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
911-
* {@inheritdoc}
905+
@@ -138,5 +138,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
906+
* @param array $context
912907
*/
913-
- public function supportsNormalization(mixed $data, string $format = null)
914-
+ 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
915910
{
916911
return \is_object($data) && !$data instanceof \Traversable;
917-
@@ -144,5 +144,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
912+
@@ -146,5 +146,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
918913
* {@inheritdoc}
919914
*/
920915
- public function normalize(mixed $object, string $format = null, array $context = [])
921916
+ public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
922917
{
923918
if (!isset($context['cache_key'])) {
924-
@@ -277,5 +277,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
919+
@@ -279,5 +279,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
925920
* {@inheritdoc}
926921
*/
927922
- protected function instantiateObject(array &$data, string $class, array &$context, \ReflectionClass $reflectionClass, array|bool $allowedAttributes, string $format = null)
928923
+ protected function instantiateObject(array &$data, string $class, array &$context, \ReflectionClass $reflectionClass, array|bool $allowedAttributes, string $format = null): object
929924
{
930925
if ($this->classDiscriminatorResolver && $mapping = $this->classDiscriminatorResolver->getMappingForClass($class)) {
931-
@@ -339,5 +339,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
926+
@@ -341,5 +341,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
932927
* @return string[]
933928
*/
934929
- abstract protected function extractAttributes(object $object, string $format = null, array $context = []);
935930
+ abstract protected function extractAttributes(object $object, string $format = null, array $context = []): array;
936931

937932
/**
938-
@@ -346,10 +346,10 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
933+
@@ -348,5 +348,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
939934
* @return mixed
940935
*/
941936
- abstract protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []);
942937
+ abstract protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []): mixed;
943938

944939
/**
945-
* {@inheritdoc}
940+
@@ -355,5 +355,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
941+
* @param array $context
946942
*/
947-
- public function supportsDenormalization(mixed $data, string $type, string $format = null)
948-
+ 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
949945
{
950946
return class_exists($type) || (interface_exists($type, false) && $this->classDiscriminatorResolver && null !== $this->classDiscriminatorResolver->getMappingForClass($type));
951-
@@ -359,5 +359,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
947+
@@ -363,5 +363,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
952948
* {@inheritdoc}
953949
*/
954950
- public function denormalize(mixed $data, string $type, string $format = null, array $context = [])
955951
+ public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed
956952
{
957953
if (!isset($context['cache_key'])) {
958954
diff --git a/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php b/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php
959-
index 5e94400b80..726d89cbb1 100644
955+
index 1c708738a1..3b6c9d5056 100644
960956
--- a/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php
961957
+++ b/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php
962958
@@ -45,5 +45,5 @@ interface DenormalizerInterface
@@ -966,14 +962,14 @@ index 5e94400b80..726d89cbb1 100644
966962
+ public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed;
967963

968964
/**
969-
@@ -56,4 +56,4 @@ interface DenormalizerInterface
965+
@@ -57,4 +57,4 @@ interface DenormalizerInterface
970966
* @return bool
971967
*/
972-
- public function supportsDenormalization(mixed $data, string $type, string $format = null);
973-
+ 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;
974970
}
975971
diff --git a/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php b/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php
976-
index 30eeafb47b..a7a60ad2f2 100644
972+
index 741f19e50b..acf3be931b 100644
977973
--- a/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php
978974
+++ b/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php
979975
@@ -37,5 +37,5 @@ interface NormalizerInterface
@@ -983,11 +979,11 @@ index 30eeafb47b..a7a60ad2f2 100644
983979
+ public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null;
984980

985981
/**
986-
@@ -47,4 +47,4 @@ interface NormalizerInterface
982+
@@ -48,4 +48,4 @@ interface NormalizerInterface
987983
* @return bool
988984
*/
989-
- public function supportsNormalization(mixed $data, string $format = null);
990-
+ 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;
991987
}
992988
diff --git a/src/Symfony/Component/Templating/Helper/HelperInterface.php b/src/Symfony/Component/Templating/Helper/HelperInterface.php
993989
index 5dade65db5..db0d0a00ea 100644
@@ -1017,31 +1013,31 @@ index 4c088b94f9..86107a636d 100644
10171013
+ abstract protected function extractFromDirectory(string|array $resource): iterable;
10181014
}
10191015
diff --git a/src/Symfony/Component/Validator/Constraint.php b/src/Symfony/Component/Validator/Constraint.php
1020-
index d6dcdf178f..0ab8d9c10e 100644
1016+
index 46432f2f4c..47ac39d5e3 100644
10211017
--- a/src/Symfony/Component/Validator/Constraint.php
10221018
+++ b/src/Symfony/Component/Validator/Constraint.php
1023-
@@ -239,5 +239,5 @@ abstract class Constraint
1019+
@@ -243,5 +243,5 @@ abstract class Constraint
10241020
* @see __construct()
10251021
*/
10261022
- public function getDefaultOption()
10271023
+ public function getDefaultOption(): ?string
10281024
{
10291025
return null;
1030-
@@ -253,5 +253,5 @@ abstract class Constraint
1026+
@@ -257,5 +257,5 @@ abstract class Constraint
10311027
* @see __construct()
10321028
*/
10331029
- public function getRequiredOptions()
10341030
+ public function getRequiredOptions(): array
10351031
{
10361032
return [];
1037-
@@ -267,5 +267,5 @@ abstract class Constraint
1033+
@@ -271,5 +271,5 @@ abstract class Constraint
10381034
* @return string
10391035
*/
10401036
- public function validatedBy()
10411037
+ public function validatedBy(): string
10421038
{
10431039
return static::class.'Validator';
1044-
@@ -281,5 +281,5 @@ abstract class Constraint
1040+
@@ -285,5 +285,5 @@ abstract class Constraint
10451041
* @return string|string[] One or more constant values
10461042
*/
10471043
- public function getTargets()

0 commit comments

Comments
 (0)