From ae9e07e3aeb229b30b5a683d298935692064d456 Mon Sep 17 00:00:00 2001 From: Alexander Grimalovsky Date: Mon, 26 Feb 2024 14:20:14 +0300 Subject: [PATCH 01/95] [FrameworkBundle] Fix registration of the bundle path to translation Fixup for 31d7a09bf5c423ad2003d6863d7372e49a195af1 --- .../FrameworkBundle/DependencyInjection/FrameworkExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 00412e5c68051..e5956d517b151 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -1349,7 +1349,7 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder $defaultDir = $container->getParameterBag()->resolveValue($config['default_path']); foreach ($container->getParameter('kernel.bundles_metadata') as $name => $bundle) { if ($container->fileExists($dir = $bundle['path'].'/Resources/translations') || $container->fileExists($dir = $bundle['path'].'/translations')) { - $dirs[] = $dir; + $dirs[] = $transPaths[] = $dir; } else { $nonExistingDirs[] = $dir; } From 2c095d8296c273b1799b43d5e222a92bd30310c7 Mon Sep 17 00:00:00 2001 From: Thomas Calvet Date: Mon, 11 Mar 2024 18:57:08 +0100 Subject: [PATCH 02/95] [HttpClient][EventSourceHttpClient] Fix consuming SSEs with \r\n separator --- .../HttpClient/EventSourceHttpClient.php | 2 +- .../Tests/EventSourceHttpClientTest.php | 21 ++++++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/Symfony/Component/HttpClient/EventSourceHttpClient.php b/src/Symfony/Component/HttpClient/EventSourceHttpClient.php index e801c1c4f39c7..89d12e87764fa 100644 --- a/src/Symfony/Component/HttpClient/EventSourceHttpClient.php +++ b/src/Symfony/Component/HttpClient/EventSourceHttpClient.php @@ -121,7 +121,7 @@ public function request(string $method, string $url, array $options = []): Respo return; } - $rx = '/((?:\r\n|[\r\n]){2,})/'; + $rx = '/((?:\r\n){2,}|\r{2,}|\n{2,})/'; $content = $state->buffer.$chunk->getContent(); if ($chunk->isLast()) { diff --git a/src/Symfony/Component/HttpClient/Tests/EventSourceHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/EventSourceHttpClientTest.php index 72eb74fb9f289..36c9d655f63c7 100644 --- a/src/Symfony/Component/HttpClient/Tests/EventSourceHttpClientTest.php +++ b/src/Symfony/Component/HttpClient/Tests/EventSourceHttpClientTest.php @@ -27,9 +27,14 @@ */ class EventSourceHttpClientTest extends TestCase { - public function testGetServerSentEvents() + /** + * @testWith ["\n"] + * ["\r"] + * ["\r\n"] + */ + public function testGetServerSentEvents(string $sep) { - $data = << false, 'http_method' => 'GET', 'url' => 'http://localhost:8080/events', 'response_headers' => ['content-type: text/event-stream']]); @@ -83,11 +88,11 @@ public function testGetServerSentEvents() $expected = [ new FirstChunk(), - new ServerSentEvent("event: builderror\nid: 46\ndata: {\"foo\": \"bar\"}\n\n"), - new ServerSentEvent("event: reload\nid: 47\ndata: {}\n\n"), - new ServerSentEvent("event: reload\nid: 48\ndata: {}\n\n"), - new ServerSentEvent("data: test\ndata:test\nid: 49\nevent: testEvent\n\n\n"), - new ServerSentEvent("id: 50\ndata: \ndata\ndata: \ndata\ndata: \n\n"), + new ServerSentEvent(str_replace("\n", $sep, "event: builderror\nid: 46\ndata: {\"foo\": \"bar\"}\n\n")), + new ServerSentEvent(str_replace("\n", $sep, "event: reload\nid: 47\ndata: {}\n\n")), + new ServerSentEvent(str_replace("\n", $sep, "event: reload\nid: 48\ndata: {}\n\n")), + new ServerSentEvent(str_replace("\n", $sep, "data: test\ndata:test\nid: 49\nevent: testEvent\n\n\n")), + new ServerSentEvent(str_replace("\n", $sep, "id: 50\ndata: \ndata\ndata: \ndata\ndata: \n\n")), ]; $i = 0; From 900d034003875d16aa7b5a293be82a9fd932c681 Mon Sep 17 00:00:00 2001 From: Mathias Arlaud Date: Wed, 29 Nov 2023 16:51:19 +0100 Subject: [PATCH 03/95] [Serializer] Fix unexpected allowed attributes --- .../Resources/config/serializer.php | 2 + .../Normalizer/AbstractObjectNormalizer.php | 4 + .../Normalizer/GetSetMethodNormalizer.php | 86 ++++++++++++++++--- .../Normalizer/ObjectNormalizer.php | 45 +++++++++- .../Normalizer/GetSetMethodNormalizerTest.php | 36 ++++++++ .../Tests/Normalizer/ObjectNormalizerTest.php | 36 ++++++++ 6 files changed, 194 insertions(+), 15 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.php b/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.php index ca0cf9b53612e..63964f34f5599 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.php +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.php @@ -137,6 +137,8 @@ service('property_info')->ignoreOnInvalid(), service('serializer.mapping.class_discriminator_resolver')->ignoreOnInvalid(), null, + [], + service('property_info')->ignoreOnInvalid(), ]) ->alias(PropertyNormalizer::class, 'serializer.normalizer.property') diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php index 4b03fa9ddb116..d5d34e8a75250 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php @@ -147,6 +147,8 @@ public function supportsNormalization($data, ?string $format = null) */ public function normalize($object, ?string $format = null, array $context = []) { + $context['_read_attributes'] = true; + if (!isset($context['cache_key'])) { $context['cache_key'] = $this->getCacheKey($format, $context); } @@ -359,6 +361,8 @@ public function supportsDenormalization($data, string $type, ?string $format = n */ public function denormalize($data, string $type, ?string $format = null, array $context = []) { + $context['_read_attributes'] = false; + if (!isset($context['cache_key'])) { $context['cache_key'] = $this->getCacheKey($format, $context); } diff --git a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php index 8d749b4e1d489..9aaac706f2133 100644 --- a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php @@ -36,6 +36,7 @@ */ class GetSetMethodNormalizer extends AbstractObjectNormalizer { + private static $reflectionCache = []; private static $setterAccessibleCache = []; /** @@ -43,7 +44,7 @@ class GetSetMethodNormalizer extends AbstractObjectNormalizer */ public function supportsNormalization($data, ?string $format = null) { - return parent::supportsNormalization($data, $format) && $this->supports(\get_class($data)); + return parent::supportsNormalization($data, $format) && $this->supports(\get_class($data), true); } /** @@ -51,7 +52,7 @@ public function supportsNormalization($data, ?string $format = null) */ public function supportsDenormalization($data, string $type, ?string $format = null) { - return parent::supportsDenormalization($data, $type, $format) && $this->supports($type); + return parent::supportsDenormalization($data, $type, $format) && $this->supports($type, false); } /** @@ -63,18 +64,22 @@ public function hasCacheableSupportsMethod(): bool } /** - * Checks if the given class has any getter method. + * Checks if the given class has any getter or setter method. */ - private function supports(string $class): bool + private function supports(string $class, bool $readAttributes): bool { if (null !== $this->classDiscriminatorResolver && $this->classDiscriminatorResolver->getMappingForClass($class)) { return true; } - $class = new \ReflectionClass($class); - $methods = $class->getMethods(\ReflectionMethod::IS_PUBLIC); - foreach ($methods as $method) { - if ($this->isGetMethod($method)) { + if (!isset(self::$reflectionCache[$class])) { + self::$reflectionCache[$class] = new \ReflectionClass($class); + } + + $reflection = self::$reflectionCache[$class]; + + foreach ($reflection->getMethods(\ReflectionMethod::IS_PUBLIC) as $reflectionMethod) { + if ($readAttributes ? $this->isGetMethod($reflectionMethod) : $this->isSetMethod($reflectionMethod)) { return true; } } @@ -95,6 +100,17 @@ private function isGetMethod(\ReflectionMethod $method): bool ); } + /** + * Checks if a method's name matches /^set.+$/ and can be called non-statically with one parameter. + */ + private function isSetMethod(\ReflectionMethod $method): bool + { + return !$method->isStatic() + && (\PHP_VERSION_ID < 80000 || !$method->getAttributes(Ignore::class)) + && 1 === $method->getNumberOfRequiredParameters() + && str_starts_with($method->name, 'set'); + } + /** * {@inheritdoc} */ @@ -124,19 +140,17 @@ protected function extractAttributes(object $object, ?string $format = null, arr */ protected function getAttributeValue(object $object, string $attribute, ?string $format = null, array $context = []) { - $ucfirsted = ucfirst($attribute); - - $getter = 'get'.$ucfirsted; + $getter = 'get'.$attribute; if (method_exists($object, $getter) && \is_callable([$object, $getter])) { return $object->$getter(); } - $isser = 'is'.$ucfirsted; + $isser = 'is'.$attribute; if (method_exists($object, $isser) && \is_callable([$object, $isser])) { return $object->$isser(); } - $haser = 'has'.$ucfirsted; + $haser = 'has'.$attribute; if (method_exists($object, $haser) && \is_callable([$object, $haser])) { return $object->$haser(); } @@ -149,7 +163,7 @@ protected function getAttributeValue(object $object, string $attribute, ?string */ protected function setAttributeValue(object $object, string $attribute, $value, ?string $format = null, array $context = []) { - $setter = 'set'.ucfirst($attribute); + $setter = 'set'.$attribute; $key = \get_class($object).':'.$setter; if (!isset(self::$setterAccessibleCache[$key])) { @@ -160,4 +174,48 @@ protected function setAttributeValue(object $object, string $attribute, $value, $object->$setter($value); } } + + protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = []) + { + if (!parent::isAllowedAttribute($classOrObject, $attribute, $format, $context)) { + return false; + } + + $class = \is_object($classOrObject) ? \get_class($classOrObject) : $classOrObject; + + if (!isset(self::$reflectionCache[$class])) { + self::$reflectionCache[$class] = new \ReflectionClass($class); + } + + $reflection = self::$reflectionCache[$class]; + + if ($context['_read_attributes'] ?? true) { + foreach (['get', 'is', 'has'] as $getterPrefix) { + $getter = $getterPrefix.$attribute; + $reflectionMethod = $reflection->hasMethod($getter) ? $reflection->getMethod($getter) : null; + if ($reflectionMethod && $this->isGetMethod($reflectionMethod)) { + return true; + } + } + + return false; + } + + $setter = 'set'.$attribute; + if ($reflection->hasMethod($setter) && $this->isSetMethod($reflection->getMethod($setter))) { + return true; + } + + $constructor = $reflection->getConstructor(); + + if ($constructor && $constructor->isPublic()) { + foreach ($constructor->getParameters() as $parameter) { + if ($parameter->getName() === $attribute) { + return true; + } + } + } + + return false; + } } diff --git a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php index 0dafaa7b7bd5f..434b53a87f1dc 100644 --- a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php @@ -14,7 +14,11 @@ use Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException; use Symfony\Component\PropertyAccess\PropertyAccess; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; +use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor; +use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; +use Symfony\Component\PropertyInfo\PropertyWriteInfo; +use Symfony\Component\Serializer\Annotation\Ignore; use Symfony\Component\Serializer\Exception\LogicException; use Symfony\Component\Serializer\Mapping\AttributeMetadata; use Symfony\Component\Serializer\Mapping\ClassDiscriminatorResolverInterface; @@ -28,11 +32,14 @@ */ class ObjectNormalizer extends AbstractObjectNormalizer { + private static $reflectionCache = []; + protected $propertyAccessor; + protected $propertyInfoExtractor; private $objectClassResolver; - public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory = null, ?NameConverterInterface $nameConverter = null, ?PropertyAccessorInterface $propertyAccessor = null, ?PropertyTypeExtractorInterface $propertyTypeExtractor = null, ?ClassDiscriminatorResolverInterface $classDiscriminatorResolver = null, ?callable $objectClassResolver = null, array $defaultContext = []) + public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory = null, ?NameConverterInterface $nameConverter = null, ?PropertyAccessorInterface $propertyAccessor = null, ?PropertyTypeExtractorInterface $propertyTypeExtractor = null, ?ClassDiscriminatorResolverInterface $classDiscriminatorResolver = null, ?callable $objectClassResolver = null, array $defaultContext = [], ?PropertyInfoExtractorInterface $propertyInfoExtractor = null) { if (!class_exists(PropertyAccess::class)) { throw new LogicException('The ObjectNormalizer class requires the "PropertyAccess" component. Install "symfony/property-access" to use it.'); @@ -45,6 +52,8 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory $this->objectClassResolver = $objectClassResolver ?? function ($class) { return \is_object($class) ? \get_class($class) : $class; }; + + $this->propertyInfoExtractor = $propertyInfoExtractor ?: new ReflectionExtractor(); } /** @@ -182,4 +191,38 @@ protected function getAllowedAttributes($classOrObject, array $context, bool $at return $allowedAttributes; } + + protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = []) + { + if (!parent::isAllowedAttribute($classOrObject, $attribute, $format, $context)) { + return false; + } + $class = \is_object($classOrObject) ? \get_class($classOrObject) : $classOrObject; + + if ($context['_read_attributes'] ?? true) { + return $this->propertyInfoExtractor->isReadable($class, $attribute) || $this->hasAttributeAccessorMethod($class, $attribute); + } + + return $this->propertyInfoExtractor->isWritable($class, $attribute) + || ($writeInfo = $this->propertyInfoExtractor->getWriteInfo($class, $attribute)) && PropertyWriteInfo::TYPE_NONE !== $writeInfo->getType(); + } + + private function hasAttributeAccessorMethod(string $class, string $attribute): bool + { + if (!isset(self::$reflectionCache[$class])) { + self::$reflectionCache[$class] = new \ReflectionClass($class); + } + + $reflection = self::$reflectionCache[$class]; + + if (!$reflection->hasMethod($attribute)) { + return false; + } + + $method = $reflection->getMethod($attribute); + + return !$method->isStatic() + && (\PHP_VERSION_ID < 80000 || !$method->getAttributes(Ignore::class)) + && !$method->getNumberOfRequiredParameters(); + } } diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php index f6b2c3e69ed9b..e7c23cf58a574 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php @@ -521,6 +521,23 @@ public function testDenormalizeWithDiscriminator() $this->assertEquals($denormalized, $normalizer->denormalize(['type' => 'two', 'url' => 'url'], GetSetMethodDummyInterface::class)); } + + public function testSupportsAndNormalizeWithOnlyParentGetter() + { + $obj = new GetSetDummyChild(); + $obj->setFoo('foo'); + + $this->assertTrue($this->normalizer->supportsNormalization($obj)); + $this->assertSame(['foo' => 'foo'], $this->normalizer->normalize($obj)); + } + + public function testSupportsAndDenormalizeWithOnlyParentSetter() + { + $this->assertTrue($this->normalizer->supportsDenormalization(['foo' => 'foo'], GetSetDummyChild::class)); + + $obj = $this->normalizer->denormalize(['foo' => 'foo'], GetSetDummyChild::class); + $this->assertSame('foo', $obj->getFoo()); + } } class GetSetDummy @@ -825,3 +842,22 @@ public function setUrl(string $url): void $this->url = $url; } } + +class GetSetDummyChild extends GetSetDummyParent +{ +} + +class GetSetDummyParent +{ + private $foo; + + public function getFoo() + { + return $this->foo; + } + + public function setFoo($foo) + { + $this->foo = $foo; + } +} diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php index 6bc99f9132854..eff523b367f98 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php @@ -18,6 +18,7 @@ use Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor; use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor; use Symfony\Component\PropertyInfo\PropertyInfoExtractor; +use Symfony\Component\Serializer\Annotation\Ignore; use Symfony\Component\Serializer\Exception\LogicException; use Symfony\Component\Serializer\Exception\RuntimeException; use Symfony\Component\Serializer\Exception\UnexpectedValueException; @@ -919,6 +920,31 @@ public function testSamePropertyAsMethodWithMethodSerializedName() $this->assertSame($expected, $this->normalizer->normalize($object)); } + + public function testNormalizeWithIgnoreAnnotationAndPrivateProperties() + { + $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $normalizer = new ObjectNormalizer($classMetadataFactory); + + $this->assertSame(['foo' => 'foo'], $normalizer->normalize(new ObjectDummyWithIgnoreAnnotationAndPrivateProperty())); + } + + public function testDenormalizeWithIgnoreAnnotationAndPrivateProperties() + { + $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $normalizer = new ObjectNormalizer($classMetadataFactory); + + $obj = $normalizer->denormalize([ + 'foo' => 'set', + 'ignore' => 'set', + 'private' => 'set', + ], ObjectDummyWithIgnoreAnnotationAndPrivateProperty::class); + + $expected = new ObjectDummyWithIgnoreAnnotationAndPrivateProperty(); + $expected->foo = 'set'; + + $this->assertEquals($expected, $obj); + } } class ProxyObjectDummy extends ObjectDummy @@ -1207,3 +1233,13 @@ public function getInner() return $this->inner; } } + +class ObjectDummyWithIgnoreAnnotationAndPrivateProperty +{ + public $foo = 'foo'; + + /** @Ignore */ + public $ignored = 'ignored'; + + private $private = 'private'; +} From 6fe892f035e1b402b9e4d5bb9dab36cafa5f01b3 Mon Sep 17 00:00:00 2001 From: Mathias Arlaud Date: Thu, 23 Nov 2023 04:53:59 +0100 Subject: [PATCH 04/95] [Serializer] Fix XML scalar to object denormalization --- .../Normalizer/AbstractObjectNormalizer.php | 4 +++ .../AbstractObjectNormalizerTest.php | 36 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php index 4b03fa9ddb116..283ed16910c94 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php @@ -369,6 +369,10 @@ public function denormalize($data, string $type, ?string $format = null, array $ return null; } + if (XmlEncoder::FORMAT === $format && !\is_array($data)) { + $data = ['#' => $data]; + } + $allowedAttributes = $this->getAllowedAttributes($type, $context, true); $normalizedData = $this->prepareForDenormalization($data); $extraAttributes = []; diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php index 5243eb2f2ef1a..c4e966cb6c4d9 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php @@ -17,6 +17,7 @@ use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor; use Symfony\Component\PropertyInfo\PropertyInfoExtractor; use Symfony\Component\PropertyInfo\Type; +use Symfony\Component\Serializer\Annotation\SerializedName; use Symfony\Component\Serializer\Exception\ExtraAttributesException; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Exception\LogicException; @@ -30,6 +31,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader; +use Symfony\Component\Serializer\NameConverter\MetadataAwareNameConverter; use Symfony\Component\Serializer\Normalizer\AbstractNormalizer; use Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer; use Symfony\Component\Serializer\Normalizer\CustomNormalizer; @@ -658,6 +660,34 @@ protected function createChildContext(array $parentContext, string $attribute, ? $this->assertFalse($normalizer->childContextCacheKey); } + + public function testDenormalizeXmlScalar() + { + $normalizer = new class () extends AbstractObjectNormalizer + { + public function __construct() + { + parent::__construct(null, new MetadataAwareNameConverter(new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())))); + } + + protected function extractAttributes(object $object, string $format = null, array $context = []): array + { + return []; + } + + protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []) + { + return null; + } + + protected function setAttributeValue(object $object, string $attribute, $value, string $format = null, array $context = []) + { + $object->$attribute = $value; + } + }; + + $this->assertSame('scalar', $normalizer->denormalize('scalar', XmlScalarDummy::class, 'xml')->value); + } } class AbstractObjectNormalizerDummy extends AbstractObjectNormalizer @@ -781,6 +811,12 @@ class DummyChild public $bar; } +class XmlScalarDummy +{ + /** @SerializedName("#") */ + public $value; +} + class SerializerCollectionDummy implements SerializerInterface, DenormalizerInterface { private $normalizers; From 97d01ecd502cb65355f05c2881d5bb7d8ef5570a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 2 Apr 2024 21:56:31 +0200 Subject: [PATCH 05/95] Update CHANGELOG for 5.4.38 --- CHANGELOG-5.4.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CHANGELOG-5.4.md b/CHANGELOG-5.4.md index 925da452b692e..a4ba8eb29eeef 100644 --- a/CHANGELOG-5.4.md +++ b/CHANGELOG-5.4.md @@ -7,6 +7,28 @@ in 5.4 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v5.4.0...v5.4.1 +* 5.4.38 (2024-04-02) + + * bug #54400 [HttpClient] stop all server processes after tests have run (xabbuh) + * bug #54425 [TwigBridge] Remove whitespaces from block form_help output (rosier) + * bug #54372 [Config] Fix `YamlReferenceDumper` handling of array examples (MatTheCat) + * bug #54362 [Filesystem] preserve the file modification time when mirroring directories (xabbuh) + * bug #54121 [Messenger] Catch TableNotFoundException in MySQL delete (acbramley) + * bug #54271 [DoctrineBridge] Fix deprecation warning with ORM 3 when guessing field lengths (eltharin) + * bug #54306 Throw TransformationFailedException when there is a null bytes injection (sormes) + * bug #54148 [Serializer] Fix object normalizer when properties has the same name as their accessor (NeilPeyssard) + * bug #54305 [Cache][Lock] Identify missing table in pgsql correctly and address failing integration tests (arifszn) + * bug #54292 [FrameworkBundle] Fix mailer config with XML (lyrixx) + * bug #54298 [Filesystem] Fix str_contains deprecation (NeilPeyssard) + * bug #54248 [Security] Correctly initialize the voter property (aschempp) + * bug #54201 [Lock] Check the correct SQLSTATE error code for MySQL (edomato) + * bug #54252 [Lock] compatiblity with redis cluster 7 (bastnic) + * bug #54219 [Validator] Allow BICs’ first four characters to be digits (MatTheCat) + * bug #54239 [Mailer] Fix sendmail transport not handling failure (aboks) + * bug #54207 [HttpClient] Lazily initialize CurlClientState (arjenm) + * bug #53865 [Workflow]Fix Marking when it must contains more than one tokens (lyrixx) + * bug #54187 [FrameworkBundle] Fix PHP 8.4 deprecation on `ReflectionMethod` (alexandre-daubois) + * 5.4.37 (2024-03-04) * bug #54102 [HttpClient] Fix deprecation on PHP 8.3 (nicolas-grekas) From 6f9973e32725f35115ca1050c397cd6a8c24fef4 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 2 Apr 2024 21:56:36 +0200 Subject: [PATCH 06/95] Update CONTRIBUTORS for 5.4.38 --- CONTRIBUTORS.md | 74 ++++++++++++++++++++++++++++++------------------- 1 file changed, 45 insertions(+), 29 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index f676651321bef..04ba9eca15947 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -32,8 +32,8 @@ The Symfony Connect username in parenthesis allows to get more information - Yonel Ceruto (yonelceruto) - Hugo Hamon (hhamon) - Tobias Nyholm (tobias) - - Samuel ROZE (sroze) - Jérôme Tamarelle (gromnan) + - Samuel ROZE (sroze) - Pascal Borreli (pborreli) - Antoine Lamirault (alamirault) - Romain Neutron @@ -58,9 +58,9 @@ The Symfony Connect username in parenthesis allows to get more information - Alexandre Salomé (alexandresalome) - Grégoire Paris (greg0ire) - William DURAND + - Vincent Langlet (deviling) - ornicar - Dany Maillard (maidmaid) - - Vincent Langlet (deviling) - Eriksen Costa - Diego Saint Esteben (dosten) - stealth35 ‏ (stealth35) @@ -77,10 +77,10 @@ The Symfony Connect username in parenthesis allows to get more information - Saša Stamenković (umpirsky) - Allison Guilhem (a_guilhem) - Mathieu Piot (mpiot) + - Simon André (simonandre) - Mathieu Santostefano (welcomattic) - Alexander Schranz (alexander-schranz) - Vasilij Duško (staff) - - Simon André (simonandre) - Sarah Khalil (saro0h) - Laurent VOULLEMIER (lvo) - Konstantin Kudryashov (everzet) @@ -92,8 +92,8 @@ The Symfony Connect username in parenthesis allows to get more information - Florin Patan (florinpatan) - Vladimir Reznichenko (kalessil) - Peter Rehm (rpet) - - Henrik Bjørnskov (henrikbjorn) - Dariusz Ruminski + - Henrik Bjørnskov (henrikbjorn) - David Buchmann (dbu) - Andrej Hudec (pulzarraider) - Jáchym Toušek (enumag) @@ -103,20 +103,20 @@ The Symfony Connect username in parenthesis allows to get more information - Denis (yethee) - Michel Weimerskirch (mweimerskirch) - Issei Murasawa (issei_m) + - Arnout Boks (aboks) - Douglas Greenshields (shieldo) - Frank A. Fiebig (fafiebig) - Baldini - Alex Pott - Fran Moreno (franmomu) - - Arnout Boks (aboks) - Charles Sarrazin (csarrazi) - Tomas Norkūnas (norkunas) - Henrik Westphal (snc) - Dariusz Górecki (canni) - Ener-Getick + - Hubert Lenoir (hubert_lenoir) - Graham Campbell (graham) - Antoine Makdessi (amakdessi) - - Hubert Lenoir (hubert_lenoir) - Tugdual Saunier (tucksaun) - Lee McDermott - Brandon Turner @@ -141,13 +141,13 @@ The Symfony Connect username in parenthesis allows to get more information - Sebastiaan Stok (sstok) - Maxime STEINHAUSSER - Rokas Mikalkėnas (rokasm) + - Tac Tacelosky (tacman1123) - gnito-org - Tim Nagel (merk) - Chris Wilkinson (thewilkybarkid) - Jérôme Vasseur (jvasseur) - Peter Kokot (peterkokot) - Brice BERNARD (brikou) - - Tac Tacelosky (tacman1123) - Michal Piotrowski - marc.weistroff - Lars Strojny (lstrojny) @@ -164,13 +164,13 @@ The Symfony Connect username in parenthesis allows to get more information - Colin Frei - excelwebzone - Paráda József (paradajozsef) + - Nicolas Philippe (nikophil) - Baptiste Clavié (talus) - Alexander Schwenn (xelaris) - Fabien Pennequin (fabienpennequin) - Gordon Franke (gimler) - Malte Schlüter (maltemaltesich) - jeremyFreeAgent (jeremyfreeagent) - - Nicolas Philippe (nikophil) - Joshua Thijssen - Vasilij Dusko - Daniel Wehner (dawehner) @@ -190,6 +190,7 @@ The Symfony Connect username in parenthesis allows to get more information - Juti Noppornpitak (shiroyuki) - Gregor Harlan (gharlan) - Anthony MARTIN + - Andreas Schempp (aschempp) - Sebastian Hörl (blogsh) - Tigran Azatyan (tigranazatyan) - Christopher Hertel (chertel) @@ -204,7 +205,6 @@ The Symfony Connect username in parenthesis allows to get more information - Alexis Lefebvre - SpacePossum - Richard van Laak (rvanlaak) - - Andreas Schempp (aschempp) - Andreas Braun - Hugo Alliaume (kocal) - Valtteri R (valtzu) @@ -214,6 +214,7 @@ The Symfony Connect username in parenthesis allows to get more information - Dāvis Zālītis (k0d3r1s) - Rafael Dohms (rdohms) - Roman Martinuk (a2a4) + - Thomas Landauer (thomas-landauer) - jwdeitch - David Prévot (taffit) - Jérôme Parmentier (lctrs) @@ -230,7 +231,6 @@ The Symfony Connect username in parenthesis allows to get more information - Albert Casademont (acasademont) - George Mponos (gmponos) - Richard Shank (iampersistent) - - Thomas Landauer (thomas-landauer) - Roland Franssen :) - Romain Monteil (ker0x) - Sergey (upyx) @@ -240,12 +240,14 @@ The Symfony Connect username in parenthesis allows to get more information - Fabien Bourigault (fbourigault) - Olivier Dolbeau (odolbeau) - Rouven Weßling (realityking) + - Daniel Burger - Ben Davies (bendavies) - YaFou - Clemens Tolboom - Oleg Voronkovich - Helmer Aaviksoo - Alessandro Lai (jean85) + - Jan Rosier (rosier) - 77web - Gocha Ossinkine (ossinkine) - Jesse Rushlow (geeshoe) @@ -265,7 +267,6 @@ The Symfony Connect username in parenthesis allows to get more information - zairig imad (zairigimad) - Colin O'Dell (colinodell) - Sébastien Alfaiate (seb33300) - - Daniel Burger - James Halsall (jaitsu) - Christian Scheb - Guillaume (guill) @@ -275,7 +276,6 @@ The Symfony Connect username in parenthesis allows to get more information - Anthony GRASSIOT (antograssiot) - Dmitrii Chekaliuk (lazyhammer) - Clément JOBEILI (dator) - - Jan Rosier (rosier) - Andreas Möller (localheinz) - Marek Štípek (maryo) - Daniel Espendiller @@ -307,6 +307,7 @@ The Symfony Connect username in parenthesis allows to get more information - Christian Schmidt - Andreas Hucks (meandmymonkey) - Noel Guilbert (noel) + - Bastien Jaillot (bastnic) - Stadly - Stepan Anchugov (kix) - bronze1man @@ -322,6 +323,7 @@ The Symfony Connect username in parenthesis allows to get more information - Pierre Minnieur (pminnieur) - Dominique Bongiraud - Hugo Monteiro (monteiro) + - Karoly Gossler (connorhu) - Bram Leeda (bram123) - Dmitrii Poddubnyi (karser) - Julien Pauli @@ -339,13 +341,13 @@ The Symfony Connect username in parenthesis allows to get more information - John Kary (johnkary) - Võ Xuân Tiến (tienvx) - fd6130 (fdtvui) + - Priyadi Iman Nurcahyo (priyadi) - Alan Poulain (alanpoulain) - Maciej Malarz (malarzm) - Marcin Sikoń (marphi) - Michele Orselli (orso) - Sven Paulus (subsven) - Maxime Veber (nek-) - - Bastien Jaillot (bastnic) - Soner Sayakci - Valentine Boineau (valentineboineau) - Rui Marinho (ruimarinho) @@ -369,7 +371,6 @@ The Symfony Connect username in parenthesis allows to get more information - dFayet - Rob Frawley 2nd (robfrawley) - Renan (renanbr) - - Karoly Gossler (connorhu) - Nikita Konstantinov (unkind) - Dariusz - Francois Zaninotto @@ -385,9 +386,10 @@ The Symfony Connect username in parenthesis allows to get more information - Benoît Burnichon (bburnichon) - maxime.steinhausser - Oleg Andreyev (oleg.andreyev) - - Priyadi Iman Nurcahyo (priyadi) - Roman Ring (inori) - Xavier Montaña Carreras (xmontana) + - Arjen van der Meijden + - Indra Gunawan (indragunawan) - Peter Kruithof (pkruithof) - Alex Hofbauer (alexhofbauer) - Romaric Drigon (romaricdrigon) @@ -462,9 +464,7 @@ The Symfony Connect username in parenthesis allows to get more information - Wouter Van Hecke - Baptiste Lafontaine (magnetik) - Iker Ibarguren (ikerib) - - Indra Gunawan (indragunawan) - Michael Holm (hollo) - - Arjen van der Meijden - Blanchon Vincent (blanchonvincent) - Michał (bambucha15) - Christian Schmidt @@ -487,6 +487,7 @@ The Symfony Connect username in parenthesis allows to get more information - Bertrand Zuchuat (garfield-fr) - Marc Morera (mmoreram) - Quynh Xuan Nguyen (seriquynh) + - Asis Pattisahusiwa - Gabor Toth (tgabi333) - realmfoo - Fabien S (bafs) @@ -524,6 +525,7 @@ The Symfony Connect username in parenthesis allows to get more information - Ahmed Raafat - Philippe Segatori - Thibaut Cheymol (tcheymol) + - Aurélien Pillevesse (aurelienpillevesse) - Erin Millard - Matthew Lewinski (lewinski) - Islam Israfilov (islam93) @@ -556,6 +558,7 @@ The Symfony Connect username in parenthesis allows to get more information - FORT Pierre-Louis (plfort) - Terje Bråten - Gonzalo Vilaseca (gonzalovilaseca) + - Stiven Llupa (sllupa) - Tarmo Leppänen (tarlepp) - Jakub Kucharovic (jkucharovic) - Daniel STANCU @@ -591,7 +594,6 @@ The Symfony Connect username in parenthesis allows to get more information - Greg Thornton (xdissent) - Alex Bowers - Michel Roca (mroca) - - Asis Pattisahusiwa - Costin Bereveanu (schniper) - Andrii Dembitskyi - Gasan Guseynov (gassan) @@ -653,6 +655,7 @@ The Symfony Connect username in parenthesis allows to get more information - Jeanmonod David (jeanmonod) - Webnet team (webnet) - Tobias Bönner + - Nicolas Rigaud - Ben Ramsey (ramsey) - Berny Cantos (xphere81) - Antonio Jose Cerezo (ajcerezo) @@ -667,6 +670,7 @@ The Symfony Connect username in parenthesis allows to get more information - Matheo Daninos (mathdns) - Niklas Fiekas - Mark Challoner (markchalloner) + - Jonathan H. Wage - Markus Bachmann (baachi) - Matthieu Lempereur (mryamous) - Gunnstein Lye (glye) @@ -733,7 +737,6 @@ The Symfony Connect username in parenthesis allows to get more information - Vadim Borodavko (javer) - Tavo Nieves J (tavoniievez) - Luc Vieillescazes (iamluc) - - Stiven Llupa (sllupa) - Erik Saunier (snickers) - François Dume (franek) - Jerzy Lekowski (jlekowski) @@ -774,6 +777,7 @@ The Symfony Connect username in parenthesis allows to get more information - Nathan Dench (ndenc2) - Gijs van Lammeren - Sebastian Bergmann + - Nadim AL ABDOU (nadim) - Matthew Grasmick - Miroslav Šustek (sustmi) - Pablo Díez (pablodip) @@ -822,6 +826,7 @@ The Symfony Connect username in parenthesis allows to get more information - alexpods - Adam Szaraniec - Dariusz Ruminski + - Pierre Ambroise (dotordu) - Romain Gautier (mykiwi) - Matthieu Bontemps - Erik Trapman @@ -914,7 +919,6 @@ The Symfony Connect username in parenthesis allows to get more information - julien57 - Mátyás Somfai (smatyas) - Bastien DURAND (deamon) - - Nicolas Rigaud - Dmitry Simushev - alcaeus - Ahmed Ghanem (ahmedghanem00) @@ -938,7 +942,6 @@ The Symfony Connect username in parenthesis allows to get more information - Christin Gruber (christingruber) - Sebastian Blum - Daniel González (daniel.gonzalez) - - Jonathan H. Wage - Julien Turby - Ricky Su (ricky) - scyzoryck @@ -967,9 +970,11 @@ The Symfony Connect username in parenthesis allows to get more information - Christophe Villeger (seragan) - Krystian Marcisz (simivar) - Julien Fredon + - Neil Peyssard (nepey) - Xavier Leune (xleune) - Hany el-Kerdany - Wang Jingyu + - Baptiste CONTRERAS - Åsmund Garfors - Maxime Douailin - Jean Pasdeloup @@ -982,6 +987,7 @@ The Symfony Connect username in parenthesis allows to get more information - Sofien Naas - Alexandre Parent - Daniel Badura + - Brajk19 - Roger Guasch (rogerguasch) - DT Inier (gam6itko) - Dustin Dobervich (dustin10) @@ -1130,7 +1136,6 @@ The Symfony Connect username in parenthesis allows to get more information - Aleksey Prilipko - Jelle Raaijmakers (gmta) - Andrew Berry - - Nadim AL ABDOU (nadim) - Sylvain BEISSIER (sylvain-beissier) - Wybren Koelmans (wybren_koelmans) - Roberto Nygaard @@ -1229,6 +1234,7 @@ The Symfony Connect username in parenthesis allows to get more information - fedor.f - Yosmany Garcia (yosmanyga) - Jeremiasz Major + - Jibé Barth (jibbarth) - Trevor North - Degory Valentine - izzyp @@ -1240,7 +1246,6 @@ The Symfony Connect username in parenthesis allows to get more information - Glodzienski - Natsuki Ikeguchi - Krzysztof Łabuś (crozin) - - Pierre Ambroise (dotordu) - Xavier Lacot (xavier) - Jon Dufresne - possum @@ -1248,6 +1253,7 @@ The Symfony Connect username in parenthesis allows to get more information - Adrien Roches (neirda24) - _sir_kane (waly) - Olivier Maisonneuve + - Gálik Pál - Andrei C. (moldman) - Mike Meier (mykon) - Pedro Miguel Maymone de Resende (pedroresende) @@ -1290,6 +1296,7 @@ The Symfony Connect username in parenthesis allows to get more information - Reen Lokum - Dennis Langen (nijusan) - Quentin Dreyer (qkdreyer) + - Francisco Alvarez (sormes) - Martin Parsiegla (spea) - Manuel Alejandro Paz Cetina - Denis Charrier (brucewouaigne) @@ -1353,6 +1360,7 @@ The Symfony Connect username in parenthesis allows to get more information - Calin Mihai Pristavu - Gabrielle Langer - Jörn Lang + - Adrian Günter (adrianguenter) - David Marín Carreño (davefx) - Fabien LUCAS (flucas2) - Alex (garrett) @@ -1573,9 +1581,11 @@ The Symfony Connect username in parenthesis allows to get more information - Chris de Kok - Eduard Bulava (nonanerz) - Andreas Kleemann (andesk) + - Ilya Levin (ilyachase) - Hubert Moreau (hmoreau) - - Brajk19 + - Nicolas Appriou - Igor Timoshenko (igor.timoshenko) + - Pierre-Emmanuel CAPEL - Manuele Menozzi - “teerasak” - Anton Babenko (antonbabenko) @@ -2115,6 +2125,7 @@ The Symfony Connect username in parenthesis allows to get more information - Arend-Jan Tetteroo - Albin Kerouaton - Sébastien HOUZÉ + - sebastian - Mbechezi Nawo - wivaku - Markus Reinhold @@ -2355,6 +2366,7 @@ The Symfony Connect username in parenthesis allows to get more information - Alexander Janssen (tnajanssen) - Thomas Chmielowiec (chmielot) - Jānis Lukss + - simbera - Julien BERNARD - Michael Zangerle - rkerner @@ -2545,6 +2557,7 @@ The Symfony Connect username in parenthesis allows to get more information - Wing - Thomas Bibb - Stefan Koopmanschap + - George Sparrow - Joni Halme - Matt Farmer - catch @@ -2572,7 +2585,6 @@ The Symfony Connect username in parenthesis allows to get more information - Christoph König (chriskoenig) - Dmytro Pigin (dotty) - Jakub Janata (janatjak) - - Jibé Barth (jibbarth) - Jm Aribau (jmaribau) - Matthew Foster (mfoster) - Paul Seiffert (seiffert) @@ -2739,6 +2751,7 @@ The Symfony Connect username in parenthesis allows to get more information - Chris - Farid Jalilov - Christiaan Wiesenekker + - Ariful Alam - Florent Olivaud - Foxprodev - Eric Hertwig @@ -2804,6 +2817,7 @@ The Symfony Connect username in parenthesis allows to get more information - Boudry Julien - amcastror - Bram Van der Sype (brammm) + - roman joly (eltharin) - Guile (guile) - Mark Beech (jaybizzle) - Julien Moulin (lizjulien) @@ -2914,6 +2928,7 @@ The Symfony Connect username in parenthesis allows to get more information - tomasz-kusy - Rémi Blaise - Nicolas Séverin + - patrickmaynard - Houssem - Joel Marcey - zolikonta @@ -3001,6 +3016,7 @@ The Symfony Connect username in parenthesis allows to get more information - zors1 - Peter Simoncic - lerminou + - Adam Bramley - Ahmad El-Bardan - mantulo - pdragun @@ -3045,6 +3061,7 @@ The Symfony Connect username in parenthesis allows to get more information - robmro27 - Vallel Blanco - Alexis MARQUIS + - Ernesto Domato - Matheus Gontijo - Gerrit Drost - Linnaea Von Lavia @@ -3184,7 +3201,6 @@ The Symfony Connect username in parenthesis allows to get more information - Lars Moelleken - dasmfm - Claas Augner - - Baptiste CONTRERAS - Mathias Geat - Angel Fernando Quiroz Campos (angelfqc) - Arnaud Buathier (arnapou) @@ -3264,6 +3280,7 @@ The Symfony Connect username in parenthesis allows to get more information - jamogon - Vyacheslav Slinko - Benjamin Laugueux + - guangwu - Lane Shukhov - Jakub Chábek - William Pinaud (DocFX) @@ -3477,7 +3494,6 @@ The Symfony Connect username in parenthesis allows to get more information - Abdouni Karim (abdounikarim) - Temuri Takalandze (abgeo) - Bernard van der Esch (adeptofvoltron) - - Adrian Günter (adrianguenter) - Andreas Forsblom (aforsblo) - Aleksejs Kovalovs (aleksejs1) - Alex Olmos (alexolmos) @@ -3545,6 +3561,7 @@ The Symfony Connect username in parenthesis allows to get more information - Julien Manganne (juuuuuu) - Ismail Faizi (kanafghan) - Karolis Daužickas (kdauzickas) + - Kérian MONTES-MORIN (kerianmm) - Sébastien Armand (khepin) - Pierre-Chanel Gauthier (kmecnin) - Krzysztof Menżyk (krymen) @@ -3588,13 +3605,13 @@ The Symfony Connect username in parenthesis allows to get more information - Sergey Stavichenko (sergey_stavichenko) - André Filipe Gonçalves Neves (seven) - Bruno Ziegler (sfcoder) + - Ángel Guzmán Maeso (shakaran) - Andrea Giuliano (shark) - Şəhriyar İmanov (shehriyari) - Thomas Baumgartner (shoplifter) - Schuyler Jager (sjager) - Christopher Georg (sky-chris) - Volker (skydiablo) - - Francisco Alvarez (sormes) - Julien Sanchez (sumbobyboys) - Stephan Vierkant (svierkant) - Ron Gähler (t-ronx) @@ -3618,7 +3635,6 @@ The Symfony Connect username in parenthesis allows to get more information - Konrad - Kovacs Nicolas - eminjk - - Gálik Pál - craigmarvelley - Stano Turza - Antoine Leblanc From 19786ecbaa6440b3c98c5bd6e3dfe59b3cf56f45 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 2 Apr 2024 21:56:39 +0200 Subject: [PATCH 07/95] Update VERSION for 5.4.38 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index b00a05f517221..e9507631059c1 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -78,12 +78,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ private static $freshCache = []; - public const VERSION = '5.4.38-DEV'; + public const VERSION = '5.4.38'; public const VERSION_ID = 50438; public const MAJOR_VERSION = 5; public const MINOR_VERSION = 4; public const RELEASE_VERSION = 38; - public const EXTRA_VERSION = 'DEV'; + public const EXTRA_VERSION = ''; public const END_OF_MAINTENANCE = '11/2024'; public const END_OF_LIFE = '11/2025'; From 50268e6336cc17381d1b04b30195df47bd4ff0a7 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 3 Apr 2024 08:07:43 +0200 Subject: [PATCH 08/95] Bump Symfony version to 5.4.39 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index e9507631059c1..aae7d8f9cd32c 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -78,12 +78,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ private static $freshCache = []; - public const VERSION = '5.4.38'; - public const VERSION_ID = 50438; + public const VERSION = '5.4.39-DEV'; + public const VERSION_ID = 50439; public const MAJOR_VERSION = 5; public const MINOR_VERSION = 4; - public const RELEASE_VERSION = 38; - public const EXTRA_VERSION = ''; + public const RELEASE_VERSION = 39; + public const EXTRA_VERSION = 'DEV'; public const END_OF_MAINTENANCE = '11/2024'; public const END_OF_LIFE = '11/2025'; From ec6da0725a53e9c8f9d9084f269b602fdafdf25e Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 3 Apr 2024 08:12:02 +0200 Subject: [PATCH 09/95] Bump Symfony version to 6.4.7 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 1b57d2b84809c..95ad28ee92e77 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -76,12 +76,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ private static array $freshCache = []; - public const VERSION = '6.4.6'; - public const VERSION_ID = 60406; + public const VERSION = '6.4.7-DEV'; + public const VERSION_ID = 60407; public const MAJOR_VERSION = 6; public const MINOR_VERSION = 4; - public const RELEASE_VERSION = 6; - public const EXTRA_VERSION = ''; + public const RELEASE_VERSION = 7; + public const EXTRA_VERSION = 'DEV'; public const END_OF_MAINTENANCE = '11/2026'; public const END_OF_LIFE = '11/2027'; From eff5e3c8e6627314937841612fb75042c2ce7e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Andr=C3=A9?= Date: Wed, 3 Apr 2024 09:20:51 +0200 Subject: [PATCH 10/95] [Translation] Silence error when intl not loaded Fix issue 1505 from Symfony Demo https://github.com/symfony/demo/issues/1505 --- src/Symfony/Component/Translation/LocaleSwitcher.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Translation/LocaleSwitcher.php b/src/Symfony/Component/Translation/LocaleSwitcher.php index c07809c58cbcc..4950a56bbb682 100644 --- a/src/Symfony/Component/Translation/LocaleSwitcher.php +++ b/src/Symfony/Component/Translation/LocaleSwitcher.php @@ -34,9 +34,14 @@ public function __construct( public function setLocale(string $locale): void { - if (class_exists(\Locale::class)) { - \Locale::setDefault($locale); + // Silently ignore if the intl extension is not loaded + try { + if (class_exists(\Locale::class, false)) { + \Locale::setDefault($locale); + } + } catch (\Exception) { } + $this->locale = $locale; $this->requestContext?->setParameter('_locale', $locale); From 8a7813b6c568c44775f6dc4572108a2faaf3c93b Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 24 Mar 2024 22:34:48 +0100 Subject: [PATCH 11/95] use local PHP web server to test HTTP stream wrappers --- .../Filesystem/Tests/FilesystemTest.php | 33 +++++++++----- .../Filesystem/Tests/Fixtures/web/index.php | 1 + .../Fixtures/web/logo_symfony_header.png | Bin 0 -> 1613 bytes .../Component/Filesystem/composer.json | 3 +- .../Mime/Tests/Part/DataPartTest.php | 41 ++++++++++-------- 5 files changed, 47 insertions(+), 31 deletions(-) create mode 100644 src/Symfony/Component/Filesystem/Tests/Fixtures/web/index.php create mode 100644 src/Symfony/Component/Filesystem/Tests/Fixtures/web/logo_symfony_header.png diff --git a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php index 7280d51357bb4..47c89995f7895 100644 --- a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php +++ b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php @@ -14,6 +14,8 @@ use Symfony\Component\Filesystem\Exception\InvalidArgumentException; use Symfony\Component\Filesystem\Exception\IOException; use Symfony\Component\Filesystem\Path; +use Symfony\Component\Process\PhpExecutableFinder; +use Symfony\Component\Process\Process; /** * Test class for Filesystem. @@ -162,23 +164,32 @@ public function testCopyCreatesTargetDirectoryIfItDoesNotExist() $this->assertStringEqualsFile($targetFilePath, 'SOURCE FILE'); } - /** - * @group network - */ public function testCopyForOriginUrlsAndExistingLocalFileDefaultsToCopy() { - if (!\in_array('https', stream_get_wrappers())) { - $this->markTestSkipped('"https" stream wrapper is not enabled.'); + if (!\in_array('http', stream_get_wrappers())) { + $this->markTestSkipped('"http" stream wrapper is not enabled.'); } - $sourceFilePath = 'https://symfony.com/images/common/logo/logo_symfony_header.png'; - $targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file'; - file_put_contents($targetFilePath, 'TARGET FILE'); + $finder = new PhpExecutableFinder(); + $process = new Process(array_merge([$finder->find(false)], $finder->findArguments(), ['-dopcache.enable=0', '-dvariables_order=EGPCS', '-S', '127.0.0.1:8057'])); + $process->setWorkingDirectory(__DIR__.'/Fixtures/web'); - $this->filesystem->copy($sourceFilePath, $targetFilePath, false); + $process->start(); - $this->assertFileExists($targetFilePath); - $this->assertEquals(file_get_contents($sourceFilePath), file_get_contents($targetFilePath)); + do { + usleep(50000); + } while (!@fopen('http://127.0.0.1:8057', 'r')); + + try { + $sourceFilePath = 'http://localhost:8057/logo_symfony_header.png'; + $targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file'; + file_put_contents($targetFilePath, 'TARGET FILE'); + $this->filesystem->copy($sourceFilePath, $targetFilePath, false); + $this->assertFileExists($targetFilePath); + $this->assertEquals(file_get_contents($sourceFilePath), file_get_contents($targetFilePath)); + } finally { + $process->stop(); + } } public function testMkdirCreatesDirectoriesRecursively() diff --git a/src/Symfony/Component/Filesystem/Tests/Fixtures/web/index.php b/src/Symfony/Component/Filesystem/Tests/Fixtures/web/index.php new file mode 100644 index 0000000000000..b3d9bbc7f3711 --- /dev/null +++ b/src/Symfony/Component/Filesystem/Tests/Fixtures/web/index.php @@ -0,0 +1 @@ +P+)L?kDsr<&)@GO8iI-d00p^8L_t(|+TEM!dZRiFh9%=g7;pD~ zwI}6ZzB(8;nKJD&yuYTMVCl0KFQjyi)<#6Mp6LE4>r(;ITc-QME|w#UrF)|0T>4~T zx*aTKKz4L9bSh)wM0a8?U*qUDa4fIjneM@q%4{5WD0L7g3u)_D4#1)Wz1Bk z#1XoAW&(90lBP>34+4R|-LX)PxvY3eXH}Xo370YbN`T`@Q%ir}H(l%KTI8s4771lT zpB1?|`u1-KPNgMGL`v7AaX>?QV);h}Po-tvx??a?toF9PET!S#o2BuuZ6+^5=z~p|JQ9!92I2 zVF)gI9S-Ad))Rrad6S=ea-9Rrkl$>&(h!J%)bLcQ*Q(6|yL~q10x~xOr49#F=YSI# zf?Xpcb5(&5tGbiuh`?+GIPTfx(ZaO3lN`4@L)UKTn4rdM;{QF3A5U5)6RW>YMEv?8 zd7$^8C#y)=P!(6fAES7~HR*k|KBK@k>$(>;+h(nPKqi!D`g>_y=W?6VY4d~xyHhye z8S`d4O-q_Gas_fWvzp+0rY(0<6Od)M2N+LPYg2eoI;j4Fj?=5(K81`n_~06PM2-mu zH-8k&8G7NNf?(4WlCIXL&lznyn<#0{6Y!yjrWQ2Hz>o7BNdP0H;9>yv^7R)DIQq`u_J7Wn&DcA&Iq?J&Aio0P|C%2Cpoi{U9``ryk z5KQk27W$0TU!g!S0@l;G`ym~{1`TBQ*_1P=3mRqZHLAv1T`5?97A#%Cwi;EiPR)vh zY&82*b2%Z=8E61pb9zQfUKwFG5)A9oHc#wf_hM%B)L2dkbOL`lZXL zy#8~>{^@POh>Ll)5osV8trGQA>ls9BBQq@Z$kYefhOAl*o9_s=C?b5WxUU4yjde^y zmoUy~KfapD%@!Ix?hgf1>g=U6j|9Vd8y+{TQ7LDb@g0gZ7r0m|-xrJ@Fo=T-L%|eV z>%$o8;aiw=Sc!rdt<9X8(>bP0eM2xbCed2Egd7_RMmVRhFXHn!z_zp301@&O?oz%b zn517*W5L`Bk2VT?L`H{K z15CyzjG#L20J#yIpo7{93;0j{d`ZSGRU6VAJ{E2T2Zm#vZ9nHWuD*uQm3MYoN;?sw zxw{Qn=o*v}5i@=BjhsPz_q;cwJx5mbBDk&mB^0c8k{ahoKhXPz`?%ZrEu{ZiGa|w? zrFB(tFNR3j<*Kh~sRb$VV~njs z@oR+F_1X~e>f@(@bwyn`6mUuXD%{!r0{rzcR?3)nzY?eMO75qD^{l`11@WNXtDq3V zVwo=Edh3$QImy!fU`W2XT+m&UyrCPzW)1~}8ES8g(*JX>zgGGWdRYnkHtkA|00000 LNkvXXu0mjf1C89g literal 0 HcmV?d00001 diff --git a/src/Symfony/Component/Filesystem/composer.json b/src/Symfony/Component/Filesystem/composer.json index e756104cd5fa4..95e9f3f035ee8 100644 --- a/src/Symfony/Component/Filesystem/composer.json +++ b/src/Symfony/Component/Filesystem/composer.json @@ -19,7 +19,8 @@ "php": ">=7.2.5", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" + "symfony/polyfill-php80": "^1.16", + "symfony/process": "^5.4|^6.4" }, "autoload": { "psr-4": { "Symfony\\Component\\Filesystem\\": "" }, diff --git a/src/Symfony/Component/Mime/Tests/Part/DataPartTest.php b/src/Symfony/Component/Mime/Tests/Part/DataPartTest.php index d0a692761fdf7..361bb00be5d19 100644 --- a/src/Symfony/Component/Mime/Tests/Part/DataPartTest.php +++ b/src/Symfony/Component/Mime/Tests/Part/DataPartTest.php @@ -138,8 +138,8 @@ public function testFromPathWithNotAFile() public function testFromPathWithUrl() { - if (!\in_array('https', stream_get_wrappers())) { - $this->markTestSkipped('"https" stream wrapper is not enabled.'); + if (!\in_array('http', stream_get_wrappers())) { + $this->markTestSkipped('"http" stream wrapper is not enabled.'); } $finder = new PhpExecutableFinder(); @@ -147,23 +147,26 @@ public function testFromPathWithUrl() $process->setWorkingDirectory(__DIR__.'/../Fixtures/web'); $process->start(); - do { - usleep(50000); - } while (!@fopen('http://127.0.0.1:8057', 'r')); - - $p = DataPart::fromPath($file = 'http://localhost:8057/logo_symfony_header.png'); - $content = file_get_contents($file); - $this->assertEquals($content, $p->getBody()); - $maxLineLength = 76; - $this->assertEquals(substr(base64_encode($content), 0, $maxLineLength), substr($p->bodyToString(), 0, $maxLineLength)); - $this->assertEquals(substr(base64_encode($content), 0, $maxLineLength), substr(implode('', iterator_to_array($p->bodyToIterable())), 0, $maxLineLength)); - $this->assertEquals('image', $p->getMediaType()); - $this->assertEquals('png', $p->getMediaSubType()); - $this->assertEquals(new Headers( - new ParameterizedHeader('Content-Type', 'image/png', ['name' => 'logo_symfony_header.png']), - new UnstructuredHeader('Content-Transfer-Encoding', 'base64'), - new ParameterizedHeader('Content-Disposition', 'attachment', ['name' => 'logo_symfony_header.png', 'filename' => 'logo_symfony_header.png']) - ), $p->getPreparedHeaders()); + try { + do { + usleep(50000); + } while (!@fopen('http://127.0.0.1:8057', 'r')); + $p = DataPart::fromPath($file = 'http://localhost:8057/logo_symfony_header.png'); + $content = file_get_contents($file); + $this->assertEquals($content, $p->getBody()); + $maxLineLength = 76; + $this->assertEquals(substr(base64_encode($content), 0, $maxLineLength), substr($p->bodyToString(), 0, $maxLineLength)); + $this->assertEquals(substr(base64_encode($content), 0, $maxLineLength), substr(implode('', iterator_to_array($p->bodyToIterable())), 0, $maxLineLength)); + $this->assertEquals('image', $p->getMediaType()); + $this->assertEquals('png', $p->getMediaSubType()); + $this->assertEquals(new Headers( + new ParameterizedHeader('Content-Type', 'image/png', ['name' => 'logo_symfony_header.png']), + new UnstructuredHeader('Content-Transfer-Encoding', 'base64'), + new ParameterizedHeader('Content-Disposition', 'attachment', ['name' => 'logo_symfony_header.png', 'filename' => 'logo_symfony_header.png']) + ), $p->getPreparedHeaders()); + } finally { + $process->stop(); + } } public function testHasContentId() From 050d8e8fbcf6eff6a1f2596ddd6c7186583abda4 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 29 Mar 2024 21:45:59 +0100 Subject: [PATCH 12/95] return null when message with name is not set --- src/Symfony/Component/Console/Helper/ProgressBar.php | 5 ++++- .../Component/Console/Tests/Helper/ProgressBarTest.php | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Console/Helper/ProgressBar.php b/src/Symfony/Component/Console/Helper/ProgressBar.php index 1d7b8d4562cb6..6250732eba257 100644 --- a/src/Symfony/Component/Console/Helper/ProgressBar.php +++ b/src/Symfony/Component/Console/Helper/ProgressBar.php @@ -169,9 +169,12 @@ public function setMessage(string $message, string $name = 'message') $this->messages[$name] = $message; } + /** + * @return string|null + */ public function getMessage(string $name = 'message') { - return $this->messages[$name]; + return $this->messages[$name] ?? null; } public function getStartTime(): int diff --git a/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php b/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php index a0c6ee129fac2..901bca630cfd1 100644 --- a/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php @@ -1173,4 +1173,11 @@ public function testMultiLineFormatIsFullyCorrectlyWithManuallyCleanup() stream_get_contents($output->getStream()) ); } + + public function testGetNotSetMessage() + { + $progressBar = new ProgressBar($this->getOutputStream()); + + $this->assertNull($progressBar->getMessage()); + } } From d2ed4a3187ca6e45f8012c661e1a175774bf672c Mon Sep 17 00:00:00 2001 From: Jeldrik Geraedts Date: Tue, 26 Mar 2024 12:47:45 +0100 Subject: [PATCH 13/95] [FrameworkBundle] fixes #54402: Suppress PHP warning when is_readable() tries to access dirs outside of open_basedir restrictions --- .../Bundle/FrameworkBundle/Command/CacheClearCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php index b245dd7a68c1f..3a81a20eca0d0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php @@ -202,7 +202,7 @@ private function isNfs(string $dir): bool if (null === $mounts) { $mounts = []; - if ('/' === \DIRECTORY_SEPARATOR && is_readable('/proc/mounts') && $files = @file('/proc/mounts')) { + if ('/' === \DIRECTORY_SEPARATOR && @is_readable('/proc/mounts') && $files = @file('/proc/mounts')) { foreach ($files as $mount) { $mount = \array_slice(explode(' ', $mount), 1, -3); if (!\in_array(array_pop($mount), ['vboxsf', 'nfs'])) { From 0c17a4e32707eb190a1ba99356f304a81287265e Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Wed, 3 Apr 2024 12:44:59 +0200 Subject: [PATCH 14/95] [Filesystem] Strengthen the check of file permissions in `dumpFile` --- src/Symfony/Component/Filesystem/Filesystem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Filesystem/Filesystem.php b/src/Symfony/Component/Filesystem/Filesystem.php index 909810f98a959..c5cfa47140052 100644 --- a/src/Symfony/Component/Filesystem/Filesystem.php +++ b/src/Symfony/Component/Filesystem/Filesystem.php @@ -691,7 +691,7 @@ public function dumpFile(string $filename, $content) throw new IOException(sprintf('Failed to write file "%s": ', $filename).self::$lastError, 0, null, $filename); } - self::box('chmod', $tmpFile, file_exists($filename) ? fileperms($filename) : 0666 & ~umask()); + self::box('chmod', $tmpFile, @fileperms($filename) ?: 0666 & ~umask()); $this->rename($tmpFile, $filename, true); } finally { From 580b06a75e950258c9499b09c2761349fead6359 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 4 Apr 2024 11:32:13 +0200 Subject: [PATCH 15/95] [Serializer] Ignore when using #[Ignore] on a non-accessor --- .../Serializer/Mapping/Loader/AnnotationLoader.php | 6 ++---- .../Tests/Mapping/Loader/AnnotationLoaderTestCase.php | 5 ++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php b/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php index 9082a3cc260ca..82bd3b792c822 100644 --- a/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php +++ b/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php @@ -138,11 +138,9 @@ public function loadClassMetadata(ClassMetadataInterface $classMetadata) $attributeMetadata->setSerializedName($annotation->getSerializedName()); } elseif ($annotation instanceof Ignore) { - if (!$accessorOrMutator) { - throw new MappingException(sprintf('Ignore on "%s::%s()" cannot be added. Ignore can only be added on methods beginning with "get", "is", "has" or "set".', $className, $method->name)); + if ($accessorOrMutator) { + $attributeMetadata->setIgnore(true); } - - $attributeMetadata->setIgnore(true); } elseif ($annotation instanceof Context) { if (!$accessorOrMutator) { throw new MappingException(sprintf('Context on "%s::%s()" cannot be added. Context can only be added on methods beginning with "get", "is", "has" or "set".', $className, $method->name)); diff --git a/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderTestCase.php b/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderTestCase.php index 5c3a686647010..b60981f7ad2ea 100644 --- a/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderTestCase.php +++ b/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderTestCase.php @@ -141,13 +141,12 @@ public function testCanHandleUnrelatedIgnoredMethods() { $class = $this->getNamespace().'\Entity45016'; - $this->expectException(MappingException::class); - $this->expectExceptionMessage(sprintf('Ignore on "%s::badIgnore()" cannot be added', $class)); - $metadata = new ClassMetadata($class); $loader = $this->getLoaderForContextMapping(); $loader->loadClassMetadata($metadata); + + $this->assertSame(['id'], array_keys($metadata->getAttributesMetadata())); } public function testIgnoreGetterWirhRequiredParameterIfIgnoreAnnotationIsUsed() From 394b5145791fb7d57a254f88538130a652305d62 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Thu, 4 Apr 2024 13:07:51 +0200 Subject: [PATCH 16/95] [Validator] Accept `Stringable` in `ExecutionContext::build/addViolation()` --- src/Symfony/Component/Validator/Context/ExecutionContext.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Validator/Context/ExecutionContext.php b/src/Symfony/Component/Validator/Context/ExecutionContext.php index f21ed90fbd40e..8ab1ec4d5ca82 100644 --- a/src/Symfony/Component/Validator/Context/ExecutionContext.php +++ b/src/Symfony/Component/Validator/Context/ExecutionContext.php @@ -139,7 +139,7 @@ public function setConstraint(Constraint $constraint): void $this->constraint = $constraint; } - public function addViolation(string $message, array $parameters = []): void + public function addViolation(string|\Stringable $message, array $parameters = []): void { $this->violations->add(new ConstraintViolation( $this->translator->trans($message, $parameters, $this->translationDomain), @@ -154,7 +154,7 @@ public function addViolation(string $message, array $parameters = []): void )); } - public function buildViolation(string $message, array $parameters = []): ConstraintViolationBuilderInterface + public function buildViolation(string|\Stringable $message, array $parameters = []): ConstraintViolationBuilderInterface { return new ConstraintViolationBuilder( $this->violations, From b559aa52154bae987f8e525c0262ed47b4fb0648 Mon Sep 17 00:00:00 2001 From: Gwendolen Lynch Date: Thu, 4 Apr 2024 10:25:16 +0200 Subject: [PATCH 17/95] [Serializer] reset backed_enum priority, and re-prioritise translatable --- .../Resources/config/serializer.php | 4 ++-- .../FrameworkExtensionTestCase.php | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.php b/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.php index f70d60429e90f..0e0031fbaf1f1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.php +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.php @@ -116,7 +116,7 @@ ->set('serializer.normalizer.translatable', TranslatableNormalizer::class) ->args(['$translator' => service('translator')]) - ->tag('serializer.normalizer', ['priority' => -890]) + ->tag('serializer.normalizer', ['priority' => -920]) ->set('serializer.normalizer.form_error', FormErrorNormalizer::class) ->tag('serializer.normalizer', ['priority' => -915]) @@ -219,6 +219,6 @@ ]) ->set('serializer.normalizer.backed_enum', BackedEnumNormalizer::class) - ->tag('serializer.normalizer', ['priority' => -880]) + ->tag('serializer.normalizer', ['priority' => -915]) ; }; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php index 7e30456900ea7..55de5cc247652 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php @@ -69,6 +69,7 @@ use Symfony\Component\Serializer\Mapping\Loader\AttributeLoader; use Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader; use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader; +use Symfony\Component\Serializer\Normalizer\BackedEnumNormalizer; use Symfony\Component\Serializer\Normalizer\ConstraintViolationListNormalizer; use Symfony\Component\Serializer\Normalizer\DataUriNormalizer; use Symfony\Component\Serializer\Normalizer\DateIntervalNormalizer; @@ -1606,10 +1607,24 @@ public function testTranslatableNormalizerRegistered() $tag = $definition->getTag('serializer.normalizer'); $this->assertSame(TranslatableNormalizer::class, $definition->getClass()); - $this->assertSame(-890, $tag[0]['priority']); + $this->assertSame(-920, $tag[0]['priority']); $this->assertEquals(new Reference('translator'), $definition->getArgument('$translator')); } + /** + * @see https://github.com/symfony/symfony/issues/54478 + */ + public function testBackedEnumNormalizerRegistered() + { + $container = $this->createContainerFromFile('full'); + + $definition = $container->getDefinition('serializer.normalizer.backed_enum'); + $tag = $definition->getTag('serializer.normalizer'); + + $this->assertSame(BackedEnumNormalizer::class, $definition->getClass()); + $this->assertSame(-915, $tag[0]['priority']); + } + public function testSerializerCacheActivated() { $container = $this->createContainerFromFile('serializer_enabled'); From d6874a87c6eca858d528a88ba5531b460624230e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ausw=C3=B6ger?= Date: Tue, 2 Apr 2024 14:30:28 +0200 Subject: [PATCH 18/95] [DomCrawler] Encode html entities only if nessecary --- src/Symfony/Component/DomCrawler/Crawler.php | 22 +++++++++++++++++-- .../Tests/AbstractCrawlerTestCase.php | 4 ++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/DomCrawler/Crawler.php b/src/Symfony/Component/DomCrawler/Crawler.php index a6c214add0964..239ace66ef262 100644 --- a/src/Symfony/Component/DomCrawler/Crawler.php +++ b/src/Symfony/Component/DomCrawler/Crawler.php @@ -1151,12 +1151,30 @@ protected function sibling(\DOMNode $node, string $siblingDir = 'nextSibling') private function parseHtml5(string $htmlContent, string $charset = 'UTF-8'): \DOMDocument { - return $this->html5Parser->parse($this->convertToHtmlEntities($htmlContent, $charset)); + if (!$this->supportsEncoding($charset)) { + $htmlContent = $this->convertToHtmlEntities($htmlContent, $charset); + $charset = 'UTF-8'; + } + + return $this->html5Parser->parse($htmlContent, ['encoding' => $charset]); + } + + private function supportsEncoding(string $encoding): bool + { + try { + return '' === @mb_convert_encoding('', $encoding, 'UTF-8'); + } catch (\Throwable $e) { + return false; + } } private function parseXhtml(string $htmlContent, string $charset = 'UTF-8'): \DOMDocument { - $htmlContent = $this->convertToHtmlEntities($htmlContent, $charset); + if ('UTF-8' === $charset && preg_match('//u', $htmlContent)) { + $htmlContent = ''.$htmlContent; + } else { + $htmlContent = $this->convertToHtmlEntities($htmlContent, $charset); + } $internalErrors = libxml_use_internal_errors(true); if (\LIBXML_VERSION < 20900) { diff --git a/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTestCase.php b/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTestCase.php index 831c2f060b012..e60f3e4ef8b0b 100644 --- a/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTestCase.php +++ b/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTestCase.php @@ -194,6 +194,10 @@ public function testAddContent() $crawler = $this->createCrawler(); $crawler->addContent($this->getDoctype().'
'); $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addContent() ignores bad charset'); + + $crawler = $this->createCrawler(); + $crawler->addContent($this->getDoctype().'', 'text/html; charset=UTF-8'); + $this->assertEquals('var foo = "bär";', $crawler->filterXPath('//script')->text(), '->addContent() does not interfere with script content'); } /** From 38b67e7d7f88f1ba441b3a1099c3812c2a024fb1 Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Wed, 28 Feb 2024 10:17:05 -0700 Subject: [PATCH 19/95] [Messenger] Improve deadlock handling on `ack()` and `reject()` --- .../Tests/Transport/ConnectionTest.php | 83 +++++++- .../DoctrinePostgreSqlIntegrationTest.php | 13 ++ ...ctrinePostgreSqlRegularIntegrationTest.php | 14 ++ .../Tests/Transport/DoctrineReceiverTest.php | 182 ++++++++++++++++++ .../Bridge/Doctrine/Transport/Connection.php | 12 +- .../Doctrine/Transport/DoctrineReceiver.php | 40 +++- 6 files changed, 331 insertions(+), 13 deletions(-) diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php index 02203af1a4a19..fac7a6e34d271 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php @@ -21,6 +21,7 @@ use Doctrine\DBAL\Platforms\OraclePlatform; use Doctrine\DBAL\Platforms\SQLServer2012Platform; use Doctrine\DBAL\Platforms\SQLServerPlatform; +use Doctrine\DBAL\Query\ForUpdate\ConflictResolutionMode; use Doctrine\DBAL\Query\QueryBuilder; use Doctrine\DBAL\Result; use Doctrine\DBAL\Schema\AbstractSchemaManager; @@ -99,6 +100,82 @@ public function testGetWithNoPendingMessageWillReturnNull() $this->assertNull($doctrineEnvelope); } + public function testGetWithSkipLockedWithForUpdateMethod() + { + if (!method_exists(QueryBuilder::class, 'forUpdate')) { + $this->markTestSkipped('This test is for when forUpdate method exists.'); + } + + $queryBuilder = $this->getQueryBuilderMock(); + $driverConnection = $this->getDBALConnectionMock(); + $stmt = $this->getResultMock(false); + + $queryBuilder + ->method('getParameters') + ->willReturn([]); + $queryBuilder + ->method('getParameterTypes') + ->willReturn([]); + $queryBuilder + ->method('forUpdate') + ->with(ConflictResolutionMode::SKIP_LOCKED) + ->willReturn($queryBuilder); + $queryBuilder + ->method('getSQL') + ->willReturn('SELECT FOR UPDATE SKIP LOCKED'); + $driverConnection->expects($this->once()) + ->method('createQueryBuilder') + ->willReturn($queryBuilder); + $driverConnection->expects($this->never()) + ->method('update'); + $driverConnection + ->method('executeQuery') + ->with($this->callback(function ($sql) { + return str_contains($sql, 'SKIP LOCKED'); + })) + ->willReturn($stmt); + + $connection = new Connection(['skip_locked' => true], $driverConnection); + $doctrineEnvelope = $connection->get(); + $this->assertNull($doctrineEnvelope); + } + + public function testGetWithSkipLockedWithoutForUpdateMethod() + { + if (method_exists(QueryBuilder::class, 'forUpdate')) { + $this->markTestSkipped('This test is for when forUpdate method does not exist.'); + } + + $queryBuilder = $this->getQueryBuilderMock(); + $driverConnection = $this->getDBALConnectionMock(); + $stmt = $this->getResultMock(false); + + $queryBuilder + ->method('getParameters') + ->willReturn([]); + $queryBuilder + ->method('getParameterTypes') + ->willReturn([]); + $queryBuilder + ->method('getSQL') + ->willReturn('SELECT'); + $driverConnection->expects($this->once()) + ->method('createQueryBuilder') + ->willReturn($queryBuilder); + $driverConnection->expects($this->never()) + ->method('update'); + $driverConnection + ->method('executeQuery') + ->with($this->callback(function ($sql) { + return str_contains($sql, 'SKIP LOCKED'); + })) + ->willReturn($stmt); + + $connection = new Connection(['skip_locked' => true], $driverConnection); + $doctrineEnvelope = $connection->get(); + $this->assertNull($doctrineEnvelope); + } + public function testItThrowsATransportExceptionIfItCannotAcknowledgeMessage() { $this->expectException(TransportException::class); @@ -507,20 +584,20 @@ class_exists(MySQLPlatform::class) ? new MySQLPlatform() : new MySQL57Platform() yield 'SQL Server' => [ class_exists(SQLServerPlatform::class) && !class_exists(SQLServer2012Platform::class) ? new SQLServerPlatform() : new SQLServer2012Platform(), - 'SELECT m.* FROM messenger_messages m WITH (UPDLOCK, ROWLOCK) WHERE (m.queue_name = ?) AND (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) ORDER BY available_at ASC OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY ', + 'SELECT m.* FROM messenger_messages m WITH (UPDLOCK, ROWLOCK, READPAST) WHERE (m.queue_name = ?) AND (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) ORDER BY available_at ASC OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY ', ]; if (!class_exists(MySQL57Platform::class)) { // DBAL >= 4 yield 'Oracle' => [ new OraclePlatform(), - 'SELECT w.id AS "id", w.body AS "body", w.headers AS "headers", w.queue_name AS "queue_name", w.created_at AS "created_at", w.available_at AS "available_at", w.delivered_at AS "delivered_at" FROM messenger_messages w WHERE w.id IN (SELECT m.id FROM messenger_messages m WHERE (m.queue_name = ?) AND (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) ORDER BY available_at ASC FETCH NEXT 1 ROWS ONLY) FOR UPDATE', + 'SELECT w.id AS "id", w.body AS "body", w.headers AS "headers", w.queue_name AS "queue_name", w.created_at AS "created_at", w.available_at AS "available_at", w.delivered_at AS "delivered_at" FROM messenger_messages w WHERE w.id IN (SELECT m.id FROM messenger_messages m WHERE (m.queue_name = ?) AND (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) ORDER BY available_at ASC FETCH NEXT 1 ROWS ONLY) FOR UPDATE SKIP LOCKED', ]; } else { // DBAL < 4 yield 'Oracle' => [ new OraclePlatform(), - 'SELECT w.id AS "id", w.body AS "body", w.headers AS "headers", w.queue_name AS "queue_name", w.created_at AS "created_at", w.available_at AS "available_at", w.delivered_at AS "delivered_at" FROM messenger_messages w WHERE w.id IN (SELECT a.id FROM (SELECT m.id FROM messenger_messages m WHERE (m.queue_name = ?) AND (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) ORDER BY available_at ASC) a WHERE ROWNUM <= 1) FOR UPDATE', + 'SELECT w.id AS "id", w.body AS "body", w.headers AS "headers", w.queue_name AS "queue_name", w.created_at AS "created_at", w.available_at AS "available_at", w.delivered_at AS "delivered_at" FROM messenger_messages w WHERE w.id IN (SELECT a.id FROM (SELECT m.id FROM messenger_messages m WHERE (m.queue_name = ?) AND (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) ORDER BY available_at ASC) a WHERE ROWNUM <= 1) FOR UPDATE SKIP LOCKED', ]; } } diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlIntegrationTest.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlIntegrationTest.php index 8f9fb31499ce4..89b932143a1e8 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlIntegrationTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlIntegrationTest.php @@ -66,6 +66,19 @@ public function testPostgreSqlConnectionSendAndGet() $this->assertNull($this->connection->get()); } + public function testSkipLocked() + { + $connection = new PostgreSqlConnection(['table_name' => 'queue_table', 'skip_locked' => true], $this->driverConnection); + + $connection->send('{"message": "Hi"}', ['type' => DummyMessage::class]); + + $encoded = $connection->get(); + $this->assertEquals('{"message": "Hi"}', $encoded['body']); + $this->assertEquals(['type' => DummyMessage::class], $encoded['headers']); + + $this->assertNull($connection->get()); + } + private function createSchemaManager(): AbstractSchemaManager { return method_exists($this->driverConnection, 'createSchemaManager') diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlRegularIntegrationTest.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlRegularIntegrationTest.php index c8abedee48f66..f462d4599a0bf 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlRegularIntegrationTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlRegularIntegrationTest.php @@ -57,6 +57,20 @@ public function testSendAndGetWithAutoSetupEnabledAndSetupAlready() $this->assertNull($this->connection->get()); } + public function testSendAndGetWithSkipLockedEnabled() + { + $connection = new Connection(['table_name' => 'queue_table', 'skip_locked' => true], $this->driverConnection); + $connection->setup(); + + $connection->send('{"message": "Hi"}', ['type' => DummyMessage::class]); + + $encoded = $connection->get(); + $this->assertSame('{"message": "Hi"}', $encoded['body']); + $this->assertSame(['type' => DummyMessage::class], $encoded['headers']); + + $this->assertNull($this->connection->get()); + } + protected function setUp(): void { if (!$host = getenv('POSTGRES_HOST')) { diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineReceiverTest.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineReceiverTest.php index 43a0772371a97..36ee1454703a6 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineReceiverTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineReceiverTest.php @@ -128,6 +128,188 @@ public function testFind() $this->assertEquals(new DummyMessage('Hi'), $actualEnvelope->getMessage()); } + public function testAck() + { + $serializer = $this->createSerializer(); + $connection = $this->createMock(Connection::class); + + $envelope = new Envelope(new \stdClass(), [new DoctrineReceivedStamp('1')]); + $receiver = new DoctrineReceiver($connection, $serializer); + + $connection + ->expects($this->once()) + ->method('ack') + ->with('1') + ->willReturn(true); + + $receiver->ack($envelope); + } + + public function testAckThrowsRetryableException() + { + $serializer = $this->createSerializer(); + $connection = $this->createMock(Connection::class); + + $envelope = new Envelope(new \stdClass(), [new DoctrineReceivedStamp('1')]); + $receiver = new DoctrineReceiver($connection, $serializer); + + $driverException = class_exists(Exception::class) ? Exception::new(new \PDOException('Deadlock', 40001)) : new PDOException(new \PDOException('Deadlock', 40001)); + if (!class_exists(Version::class)) { + // This is doctrine/dbal 3.x + $deadlockException = new DeadlockException($driverException, null); + } else { + $deadlockException = new DeadlockException('Deadlock', $driverException); + } + + $connection + ->expects($this->exactly(2)) + ->method('ack') + ->with('1') + ->willReturnOnConsecutiveCalls( + $this->throwException($deadlockException), + true, + ); + + $receiver->ack($envelope); + } + + public function testAckThrowsRetryableExceptionAndRetriesFail() + { + $serializer = $this->createSerializer(); + $connection = $this->createMock(Connection::class); + + $envelope = new Envelope(new \stdClass(), [new DoctrineReceivedStamp('1')]); + $receiver = new DoctrineReceiver($connection, $serializer); + + $driverException = class_exists(Exception::class) ? Exception::new(new \PDOException('Deadlock', 40001)) : new PDOException(new \PDOException('Deadlock', 40001)); + if (!class_exists(Version::class)) { + // This is doctrine/dbal 3.x + $deadlockException = new DeadlockException($driverException, null); + } else { + $deadlockException = new DeadlockException('Deadlock', $driverException); + } + + $connection + ->expects($this->exactly(4)) + ->method('ack') + ->with('1') + ->willThrowException($deadlockException); + + self::expectException(TransportException::class); + $receiver->ack($envelope); + } + + public function testAckThrowsException() + { + $serializer = $this->createSerializer(); + $connection = $this->createMock(Connection::class); + + $envelope = new Envelope(new \stdClass(), [new DoctrineReceivedStamp('1')]); + $receiver = new DoctrineReceiver($connection, $serializer); + + $exception = new \RuntimeException(); + + $connection + ->expects($this->once()) + ->method('ack') + ->with('1') + ->willThrowException($exception); + + self::expectException($exception::class); + $receiver->ack($envelope); + } + + public function testReject() + { + $serializer = $this->createSerializer(); + $connection = $this->createMock(Connection::class); + + $envelope = new Envelope(new \stdClass(), [new DoctrineReceivedStamp('1')]); + $receiver = new DoctrineReceiver($connection, $serializer); + + $connection + ->expects($this->once()) + ->method('reject') + ->with('1') + ->willReturn(true); + + $receiver->reject($envelope); + } + + public function testRejectThrowsRetryableException() + { + $serializer = $this->createSerializer(); + $connection = $this->createMock(Connection::class); + + $envelope = new Envelope(new \stdClass(), [new DoctrineReceivedStamp('1')]); + $receiver = new DoctrineReceiver($connection, $serializer); + + $driverException = class_exists(Exception::class) ? Exception::new(new \PDOException('Deadlock', 40001)) : new PDOException(new \PDOException('Deadlock', 40001)); + if (!class_exists(Version::class)) { + // This is doctrine/dbal 3.x + $deadlockException = new DeadlockException($driverException, null); + } else { + $deadlockException = new DeadlockException('Deadlock', $driverException); + } + + $connection + ->expects($this->exactly(2)) + ->method('reject') + ->with('1') + ->willReturnOnConsecutiveCalls( + $this->throwException($deadlockException), + true, + ); + + $receiver->reject($envelope); + } + + public function testRejectThrowsRetryableExceptionAndRetriesFail() + { + $serializer = $this->createSerializer(); + $connection = $this->createMock(Connection::class); + + $envelope = new Envelope(new \stdClass(), [new DoctrineReceivedStamp('1')]); + $receiver = new DoctrineReceiver($connection, $serializer); + + $driverException = class_exists(Exception::class) ? Exception::new(new \PDOException('Deadlock', 40001)) : new PDOException(new \PDOException('Deadlock', 40001)); + if (!class_exists(Version::class)) { + // This is doctrine/dbal 3.x + $deadlockException = new DeadlockException($driverException, null); + } else { + $deadlockException = new DeadlockException('Deadlock', $driverException); + } + + $connection + ->expects($this->exactly(4)) + ->method('reject') + ->with('1') + ->willThrowException($deadlockException); + + self::expectException(TransportException::class); + $receiver->reject($envelope); + } + + public function testRejectThrowsException() + { + $serializer = $this->createSerializer(); + $connection = $this->createMock(Connection::class); + + $envelope = new Envelope(new \stdClass(), [new DoctrineReceivedStamp('1')]); + $receiver = new DoctrineReceiver($connection, $serializer); + + $exception = new \RuntimeException(); + + $connection + ->expects($this->once()) + ->method('reject') + ->with('1') + ->willThrowException($exception); + + self::expectException($exception::class); + $receiver->reject($envelope); + } + private function createDoctrineEnvelope(): array { return [ diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php index e3030d3a1d55f..f7cf63a9b830d 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php @@ -21,6 +21,7 @@ use Doctrine\DBAL\Platforms\MySQLPlatform; use Doctrine\DBAL\Platforms\OraclePlatform; use Doctrine\DBAL\Platforms\PostgreSQLPlatform; +use Doctrine\DBAL\Query\ForUpdate\ConflictResolutionMode; use Doctrine\DBAL\Query\QueryBuilder; use Doctrine\DBAL\Result; use Doctrine\DBAL\Schema\AbstractSchemaManager; @@ -186,15 +187,22 @@ public function get(): ?array ->setParameters($query->getParameters(), $query->getParameterTypes()); if (method_exists(QueryBuilder::class, 'forUpdate')) { - $query->forUpdate(); + $query->forUpdate(ConflictResolutionMode::SKIP_LOCKED); } $sql = $query->getSQL(); } elseif (method_exists(QueryBuilder::class, 'forUpdate')) { - $query->forUpdate(); + $query->forUpdate(ConflictResolutionMode::SKIP_LOCKED); try { $sql = $query->getSQL(); } catch (DBALException $e) { + // If SKIP_LOCKED is not supported, fallback to without SKIP_LOCKED + $query->forUpdate(); + + try { + $sql = $query->getSQL(); + } catch (DBALException $e) { + } } } elseif (preg_match('/FROM (.+) WHERE/', (string) $sql, $matches)) { $fromClause = $matches[1]; diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineReceiver.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineReceiver.php index 2f6e4a5a823ad..20bd61151c44e 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineReceiver.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineReceiver.php @@ -67,20 +67,16 @@ public function get(): iterable public function ack(Envelope $envelope): void { - try { + $this->withRetryableExceptionRetry(function() use ($envelope) { $this->connection->ack($this->findDoctrineReceivedStamp($envelope)->getId()); - } catch (DBALException $exception) { - throw new TransportException($exception->getMessage(), 0, $exception); - } + }); } public function reject(Envelope $envelope): void { - try { + $this->withRetryableExceptionRetry(function() use ($envelope) { $this->connection->reject($this->findDoctrineReceivedStamp($envelope)->getId()); - } catch (DBALException $exception) { - throw new TransportException($exception->getMessage(), 0, $exception); - } + }); } public function getMessageCount(): int @@ -150,4 +146,32 @@ private function createEnvelopeFromData(array $data): Envelope new TransportMessageIdStamp($data['id']) ); } + + private function withRetryableExceptionRetry(callable $callable): void + { + $delay = 100; + $multiplier = 2; + $jitter = 0.1; + $retries = 0; + + retry: + try { + $callable(); + } catch (RetryableException $exception) { + if (++$retries <= self::MAX_RETRIES) { + $delay *= $multiplier; + + $randomness = (int) ($delay * $jitter); + $delay += random_int(-$randomness, +$randomness); + + usleep($delay * 1000); + + goto retry; + } + + throw new TransportException($exception->getMessage(), 0, $exception); + } catch (DBALException $exception) { + throw new TransportException($exception->getMessage(), 0, $exception); + } + } } From e8b3160ca2d5a7e7f6125f3778fed4c0ce90c256 Mon Sep 17 00:00:00 2001 From: Kasper Hansen Date: Thu, 4 Apr 2024 21:25:31 +0200 Subject: [PATCH 20/95] [Security] Fix Danish translations --- .../Resources/translations/security.da.xlf | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.da.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.da.xlf index bfa65ee21f2d1..bd58bee7037c2 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.da.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.da.xlf @@ -8,11 +8,11 @@ Authentication credentials could not be found. - Loginoplysninger kan ikke findes. + Loginoplysninger kunne ikke findes. Authentication request could not be processed due to a system problem. - Godkendelsesanmodning kan ikke behandles på grund af et systemfejl. + Godkendelsesanmodningen kunne ikke behandles på grund af en systemfejl. Invalid credentials. @@ -20,7 +20,7 @@ Cookie has already been used by someone else. - Cookie er allerede brugt af en anden. + Cookie er allerede blevet brugt af en anden. Not privileged to request the resource. @@ -32,19 +32,19 @@ No authentication provider found to support the authentication token. - Ingen godkendelsesudbyder er fundet til understøttelsen af godkendelsestoken. + Ingen godkendelsesudbyder blev fundet til at understøtte godkendelsestoken. No session available, it either timed out or cookies are not enabled. - Ingen session tilgængelig, sessionen er enten udløbet eller cookies er ikke aktiveret. + Ingen session er tilgængelig. Den er enten udløbet eller cookies er ikke aktiveret. No token could be found. - Ingen token kan findes. + Ingen token kunne findes. Username could not be found. - Brugernavn kan ikke findes. + Brugernavn kunne ikke findes. Account has expired. @@ -64,15 +64,15 @@ Too many failed login attempts, please try again later. - For mange fejlede login forsøg, prøv venligst senere. + For mange mislykkede loginforsøg. Prøv venligst igen senere. Invalid or expired login link. - Ugyldigt eller udløbet login link. + Ugyldigt eller udløbet login-link. Too many failed login attempts, please try again in %minutes% minute. - For mange fejlede login forsøg, prøv igen om %minutes% minut. + For mange mislykkede loginforsøg. Prøv venligst igen om %minutes% minut. From 3d2d1d2ec44ea3694c91145947c72081d74ac32e Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 5 Apr 2024 20:56:43 +0200 Subject: [PATCH 21/95] add translations for the requireTld constraint option message --- .../Validator/Resources/translations/validators.de.xlf | 4 ++++ .../Validator/Resources/translations/validators.en.xlf | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf index 9f145fdeed911..d15fb9c3da8ed 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Dieser Wert ist keine gültige MAC-Adresse. + + This URL does not contain a TLD. + Diese URL enthält keine TLD. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf index 35196e572e0f0..94ff94a1ee6d9 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. This value is not a valid MAC address. + + This URL does not contain a TLD. + This URL does not contain a TLD. + From d5094eb6ff4d606963dfb3d34a758543e3ea95b5 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 5 Apr 2024 21:05:57 +0200 Subject: [PATCH 22/95] fix syntax for PHP 7.2 --- .../Component/HttpClient/Tests/EventSourceHttpClientTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpClient/Tests/EventSourceHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/EventSourceHttpClientTest.php index 36c9d655f63c7..fff3a0e7c18b7 100644 --- a/src/Symfony/Component/HttpClient/Tests/EventSourceHttpClientTest.php +++ b/src/Symfony/Component/HttpClient/Tests/EventSourceHttpClientTest.php @@ -34,7 +34,7 @@ class EventSourceHttpClientTest extends TestCase */ public function testGetServerSentEvents(string $sep) { - $data = str_replace("\n", $sep, << false, 'http_method' => 'GET', 'url' => 'http://localhost:8080/events', 'response_headers' => ['content-type: text/event-stream']]); From b293ffe57613e387673debd2131583fce0b7d6bc Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 5 Apr 2024 21:45:29 +0200 Subject: [PATCH 23/95] fix merge --- .../Tests/Normalizer/AbstractObjectNormalizerTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php index b21fc5a1f5f43..ab9191ecafa44 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php @@ -1040,12 +1040,12 @@ protected function extractAttributes(object $object, string $format = null, arra return []; } - protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []) + protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []): mixed { return null; } - protected function setAttributeValue(object $object, string $attribute, $value, string $format = null, array $context = []) + protected function setAttributeValue(object $object, string $attribute, $value, string $format = null, array $context = []): void { $object->$attribute = $value; } From 954f1af385536edae9a87b83da761b1de089e673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Andr=C3=A9?= Date: Sat, 6 Apr 2024 01:54:31 +0200 Subject: [PATCH 24/95] [HttpFoundation] Set content-type header in RedirectResponse --- src/Symfony/Component/HttpFoundation/RedirectResponse.php | 1 + .../HttpFoundation/Tests/RedirectResponseTest.php | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/Symfony/Component/HttpFoundation/RedirectResponse.php b/src/Symfony/Component/HttpFoundation/RedirectResponse.php index 2103280c60184..7b89f0faf610e 100644 --- a/src/Symfony/Component/HttpFoundation/RedirectResponse.php +++ b/src/Symfony/Component/HttpFoundation/RedirectResponse.php @@ -103,6 +103,7 @@ public function setTargetUrl(string $url) ', htmlspecialchars($url, \ENT_QUOTES, 'UTF-8'))); $this->headers->set('Location', $url); + $this->headers->set('Content-Type', 'text/html; charset=utf-8'); return $this; } diff --git a/src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php index 3d2f05ffcd6a2..483bad20c7674 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php @@ -44,6 +44,13 @@ public function testGenerateLocationHeader() $this->assertEquals('foo.bar', $response->headers->get('Location')); } + public function testGenerateContentTypeHeader() + { + $response = new RedirectResponse('foo.bar'); + + $this->assertSame('text/html; charset=utf-8', $response->headers->get('Content-Type')); + } + public function testGetTargetUrl() { $response = new RedirectResponse('foo.bar'); From 3582bdd13c96883d567426c94975cb5419ba863c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Andr=C3=A9?= Date: Sat, 6 Apr 2024 23:33:15 +0200 Subject: [PATCH 25/95] [HtmlSanitizer] Ignore Processing Instructions --- .../Component/HtmlSanitizer/Tests/HtmlSanitizerAllTest.php | 6 ++++++ src/Symfony/Component/HtmlSanitizer/Visitor/DomVisitor.php | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerAllTest.php b/src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerAllTest.php index a0a15116b3137..90436cae631a7 100644 --- a/src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerAllTest.php +++ b/src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerAllTest.php @@ -309,6 +309,12 @@ public static function provideSanitizeBody() 'Lorem ipsum ', ], + // Processing instructions + [ + 'Lorem ipsumfoo', + 'Lorem ipsumfoo', + ], + // Normal tags [ 'Lorem ipsum', diff --git a/src/Symfony/Component/HtmlSanitizer/Visitor/DomVisitor.php b/src/Symfony/Component/HtmlSanitizer/Visitor/DomVisitor.php index 4c2eba0c16198..8cda8cf2a8bd0 100644 --- a/src/Symfony/Component/HtmlSanitizer/Visitor/DomVisitor.php +++ b/src/Symfony/Component/HtmlSanitizer/Visitor/DomVisitor.php @@ -134,9 +134,10 @@ private function visitChildren(\DOMNode $domNode, Cursor $cursor): void if ('#text' === $child->nodeName) { // Add text directly for performance $cursor->node->addChild(new TextNode($cursor->node, $child->nodeValue)); - } elseif (!$child instanceof \DOMText) { + } elseif (!$child instanceof \DOMText && !$child instanceof \DOMProcessingInstruction) { // Otherwise continue the visit recursively // Ignore comments for security reasons (interpreted differently by browsers) + // Ignore processing instructions (treated as comments) $this->visitNode($child, $cursor); } } From 22dab6798f4ff3b67ec7e3bd67bc43ae9caa9dd1 Mon Sep 17 00:00:00 2001 From: MatTheCat Date: Mon, 25 Mar 2024 14:01:48 +0100 Subject: [PATCH 26/95] [Messenger] Make Doctrine connection ignore unrelated tables on setup --- .../Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php | 1 + .../Messenger/Bridge/Doctrine/Transport/Connection.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php index e1b4d4afdda44..c4aa03ef14400 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php @@ -205,6 +205,7 @@ public function testItRetrieveTheMessageThatIsOlderThanRedeliverTimeout() public function testTheTransportIsSetupOnGet() { + $this->driverConnection->executeStatement('CREATE TABLE unrelated (unknown_type_column)'); $this->assertFalse($this->createSchemaManager()->tablesExist(['messenger_messages'])); $this->assertNull($this->connection->get()); diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php index 79b302760ad22..100058d240fcd 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php @@ -289,7 +289,7 @@ public function setup(): void { $configuration = $this->driverConnection->getConfiguration(); $assetFilter = $configuration->getSchemaAssetsFilter(); - $configuration->setSchemaAssetsFilter(static function () { return true; }); + $configuration->setSchemaAssetsFilter(function (string $tableName) { return $tableName === $this->configuration['table_name']; }); $this->updateSchema(); $configuration->setSchemaAssetsFilter($assetFilter); $this->autoSetup = false; From 69a7867023529af868c57be763953c2b0104bdaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20H=C3=BCneburg?= Date: Sun, 7 Apr 2024 15:56:47 +0200 Subject: [PATCH 27/95] [HttpClient] Let curl handle transfer encoding --- src/Symfony/Component/HttpClient/CurlHttpClient.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/HttpClient/CurlHttpClient.php b/src/Symfony/Component/HttpClient/CurlHttpClient.php index 3a2fba025aeff..4c5ced322d5de 100644 --- a/src/Symfony/Component/HttpClient/CurlHttpClient.php +++ b/src/Symfony/Component/HttpClient/CurlHttpClient.php @@ -246,9 +246,8 @@ public function request(string $method, string $url, array $options = []): Respo if (isset($options['normalized_headers']['content-length'][0])) { $curlopts[\CURLOPT_INFILESIZE] = (int) substr($options['normalized_headers']['content-length'][0], \strlen('Content-Length: ')); - } - if (!isset($options['normalized_headers']['transfer-encoding'])) { - $curlopts[\CURLOPT_HTTPHEADER][] = 'Transfer-Encoding:'.(isset($curlopts[\CURLOPT_INFILESIZE]) ? '' : ' chunked'); + } elseif (!isset($options['normalized_headers']['transfer-encoding'])) { + $curlopts[\CURLOPT_INFILESIZE] = -1; } if ('POST' !== $method) { From 452fac450cd9ae20c889aa6b4c6b2a5ce790ef45 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Mon, 8 Apr 2024 23:48:23 +0200 Subject: [PATCH 28/95] fix tests --- .../Bridge/Doctrine/Tests/Transport/ConnectionTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php index fac7a6e34d271..3544a03c2dca6 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php @@ -300,7 +300,7 @@ private function getDBALConnectionMock() $platform = $this->createMock(AbstractPlatform::class); if (!method_exists(QueryBuilder::class, 'forUpdate')) { - $platform->method('getWriteLockSQL')->willReturn('FOR UPDATE'); + $platform->method('getWriteLockSQL')->willReturn('FOR UPDATE SKIP LOCKED'); } $configuration = $this->createMock(\Doctrine\DBAL\Configuration::class); @@ -584,7 +584,7 @@ class_exists(MySQLPlatform::class) ? new MySQLPlatform() : new MySQL57Platform() yield 'SQL Server' => [ class_exists(SQLServerPlatform::class) && !class_exists(SQLServer2012Platform::class) ? new SQLServerPlatform() : new SQLServer2012Platform(), - 'SELECT m.* FROM messenger_messages m WITH (UPDLOCK, ROWLOCK, READPAST) WHERE (m.queue_name = ?) AND (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) ORDER BY available_at ASC OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY ', + sprintf('SELECT m.* FROM messenger_messages m WITH (UPDLOCK, ROWLOCK%s) WHERE (m.queue_name = ?) AND (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) ORDER BY available_at ASC OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY ', method_exists(QueryBuilder::class, 'forUpdate') ? ', READPAST' : ''), ]; if (!class_exists(MySQL57Platform::class)) { @@ -597,7 +597,7 @@ class_exists(SQLServerPlatform::class) && !class_exists(SQLServer2012Platform::c // DBAL < 4 yield 'Oracle' => [ new OraclePlatform(), - 'SELECT w.id AS "id", w.body AS "body", w.headers AS "headers", w.queue_name AS "queue_name", w.created_at AS "created_at", w.available_at AS "available_at", w.delivered_at AS "delivered_at" FROM messenger_messages w WHERE w.id IN (SELECT a.id FROM (SELECT m.id FROM messenger_messages m WHERE (m.queue_name = ?) AND (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) ORDER BY available_at ASC) a WHERE ROWNUM <= 1) FOR UPDATE SKIP LOCKED', + sprintf('SELECT w.id AS "id", w.body AS "body", w.headers AS "headers", w.queue_name AS "queue_name", w.created_at AS "created_at", w.available_at AS "available_at", w.delivered_at AS "delivered_at" FROM messenger_messages w WHERE w.id IN (SELECT a.id FROM (SELECT m.id FROM messenger_messages m WHERE (m.queue_name = ?) AND (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) ORDER BY available_at ASC) a WHERE ROWNUM <= 1) FOR UPDATE%s', method_exists(QueryBuilder::class, 'forUpdate') ? ' SKIP LOCKED' : ''), ]; } } From 6a96d35cb7ac905f3300909e8a6b35d53700043c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C4=81vis=20Z=C4=81l=C4=ABtis?= Date: Tue, 9 Apr 2024 10:13:52 +0300 Subject: [PATCH 29/95] [Validator] add missing lv translation --- .../Validator/Resources/translations/validators.lv.xlf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf index d1222f02b72a5..5ff2c412215b2 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Šī vērtība nav derīga MAC adrese. + + This URL does not contain a TLD. + Šis URL nesatur augšējā līmeņa domēnu (TLD). + From a9eeb06384935dcfe70c8ef0fad5b3f506ca0a5c Mon Sep 17 00:00:00 2001 From: Tomasz Kowalczyk Date: Mon, 8 Apr 2024 15:32:37 +0200 Subject: [PATCH 30/95] [Validator] added missing Polish translation for unit 113 --- .../Validator/Resources/translations/validators.pl.xlf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf index 29180984e6dfb..f3f43d4393e4b 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Ta wartość nie jest prawidłowym adresem MAC. + + This URL does not contain a TLD. + Podany adres URL nie zawiera domeny najwyższego poziomu (TLD). + From cf6151d94dd9e2bd8e33adb58d79c4d5e4abf6ca Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 9 Apr 2024 14:16:12 +0200 Subject: [PATCH 31/95] [Validator] Fill in trans-unit id 113: This URL does not contain a TLD. --- .github/sync-translations.php | 2 ++ .github/workflows/integration-tests.yml | 10 +++++----- .../Translation/Resources/bin/translation-status.php | 4 ++-- .../Validator/Resources/translations/validators.af.xlf | 4 ++++ .../Validator/Resources/translations/validators.ar.xlf | 4 ++++ .../Validator/Resources/translations/validators.az.xlf | 4 ++++ .../Validator/Resources/translations/validators.be.xlf | 4 ++++ .../Validator/Resources/translations/validators.bg.xlf | 4 ++++ .../Validator/Resources/translations/validators.bs.xlf | 4 ++++ .../Validator/Resources/translations/validators.ca.xlf | 4 ++++ .../Validator/Resources/translations/validators.cs.xlf | 4 ++++ .../Validator/Resources/translations/validators.cy.xlf | 4 ++++ .../Validator/Resources/translations/validators.da.xlf | 4 ++++ .../Validator/Resources/translations/validators.el.xlf | 8 ++++++-- .../Validator/Resources/translations/validators.es.xlf | 4 ++++ .../Validator/Resources/translations/validators.et.xlf | 4 ++++ .../Validator/Resources/translations/validators.eu.xlf | 4 ++++ .../Validator/Resources/translations/validators.fa.xlf | 4 ++++ .../Validator/Resources/translations/validators.fi.xlf | 4 ++++ .../Validator/Resources/translations/validators.fr.xlf | 4 ++++ .../Validator/Resources/translations/validators.gl.xlf | 4 ++++ .../Validator/Resources/translations/validators.he.xlf | 4 ++++ .../Validator/Resources/translations/validators.hr.xlf | 4 ++++ .../Validator/Resources/translations/validators.hu.xlf | 4 ++++ .../Validator/Resources/translations/validators.hy.xlf | 4 ++++ .../Validator/Resources/translations/validators.id.xlf | 4 ++++ .../Validator/Resources/translations/validators.it.xlf | 4 ++++ .../Validator/Resources/translations/validators.ja.xlf | 4 ++++ .../Validator/Resources/translations/validators.lb.xlf | 4 ++++ .../Validator/Resources/translations/validators.lt.xlf | 4 ++++ .../Validator/Resources/translations/validators.mk.xlf | 4 ++++ .../Validator/Resources/translations/validators.mn.xlf | 4 ++++ .../Validator/Resources/translations/validators.my.xlf | 4 ++++ .../Validator/Resources/translations/validators.nb.xlf | 4 ++++ .../Validator/Resources/translations/validators.nl.xlf | 4 ++++ .../Validator/Resources/translations/validators.nn.xlf | 4 ++++ .../Validator/Resources/translations/validators.no.xlf | 4 ++++ .../Validator/Resources/translations/validators.pt.xlf | 4 ++++ .../Resources/translations/validators.pt_BR.xlf | 4 ++++ .../Validator/Resources/translations/validators.ro.xlf | 4 ++++ .../Validator/Resources/translations/validators.ru.xlf | 4 ++++ .../Validator/Resources/translations/validators.sk.xlf | 4 ++++ .../Validator/Resources/translations/validators.sl.xlf | 4 ++++ .../Validator/Resources/translations/validators.sq.xlf | 4 ++++ .../Resources/translations/validators.sr_Cyrl.xlf | 4 ++++ .../Resources/translations/validators.sr_Latn.xlf | 4 ++++ .../Validator/Resources/translations/validators.sv.xlf | 4 ++++ .../Validator/Resources/translations/validators.th.xlf | 4 ++++ .../Validator/Resources/translations/validators.tl.xlf | 4 ++++ .../Validator/Resources/translations/validators.tr.xlf | 4 ++++ .../Validator/Resources/translations/validators.uk.xlf | 4 ++++ .../Validator/Resources/translations/validators.ur.xlf | 4 ++++ .../Validator/Resources/translations/validators.uz.xlf | 4 ++++ .../Validator/Resources/translations/validators.vi.xlf | 4 ++++ .../Resources/translations/validators.zh_CN.xlf | 4 ++++ .../Resources/translations/validators.zh_TW.xlf | 4 ++++ 56 files changed, 223 insertions(+), 9 deletions(-) diff --git a/.github/sync-translations.php b/.github/sync-translations.php index 13f05d1459c86..fa3b28a7fec7e 100644 --- a/.github/sync-translations.php +++ b/.github/sync-translations.php @@ -108,6 +108,8 @@ function mergeDom(\DOMDocument $dom, \DOMNode $tree, \DOMNode $input) if ($catalogue->defines($resname, $domain)) { $translation = $catalogue->get($resname, $domain); $metadata = $catalogue->getMetadata($resname, $domain); + } else { + $translation = $source; } $metadata['id'] = $enCatalogue->getMetadata($resname, $domain)['id']; if ($resname !== $source) { diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 5511e08ad6407..c92a5ed03b762 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -114,6 +114,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Install system dependencies run: | @@ -201,13 +203,11 @@ jobs: - name: Check for changes in translation files id: changed-translation-files run: | - if git diff --quiet HEAD~1 HEAD -- 'src/**/Resources/translations/*.xlf'; then - echo "{changed}={true}" >> $GITHUB_OUTPUT - else - echo "{changed}={false}" >> $GITHUB_OUTPUT - fi + echo 'changed='$((git diff --quiet HEAD~1 HEAD -- 'src/**/Resources/translations/*.xlf' || (echo 'true' && exit 1)) && echo 'false') >> $GITHUB_OUTPUT - name: Check Translation Status if: steps.changed-translation-files.outputs.changed == 'true' run: | php src/Symfony/Component/Translation/Resources/bin/translation-status.php -v + php .github/sync-translations.php + git diff --exit-code src/ || (echo 'Run "php .github/sync-translations.php" to fix XLIFF files.' && exit 1) diff --git a/src/Symfony/Component/Translation/Resources/bin/translation-status.php b/src/Symfony/Component/Translation/Resources/bin/translation-status.php index 53e642c00dca7..1ab72c0006db3 100644 --- a/src/Symfony/Component/Translation/Resources/bin/translation-status.php +++ b/src/Symfony/Component/Translation/Resources/bin/translation-status.php @@ -166,11 +166,11 @@ function extractLocaleFromFilePath($filePath) function extractTranslationKeys($filePath) { $translationKeys = []; - $contents = new \SimpleXMLElement(file_get_contents($filePath)); + $contents = new SimpleXMLElement(file_get_contents($filePath)); foreach ($contents->file->body->{'trans-unit'} as $translationKey) { $translationId = (string) $translationKey['id']; - $translationKey = (string) $translationKey->source; + $translationKey = (string) ($translationKey['resname'] ?? $translationKey->source); $translationKeys[$translationId] = $translationKey; } diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf index 387fb9a649711..64ce4f8c9ef8f 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Hierdie waarde is nie 'n geldige MAC-adres nie. + + This URL does not contain a TLD. + Hierdie URL bevat nie 'n topvlakdomein (TLD) nie. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf index dfd398ae95a4f..6d78ca77a217d 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. هذه القيمة ليست عنوان MAC صالحًا. + + This URL does not contain a TLD. + هذا الرابط لا يحتوي على نطاق أعلى مستوى (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.az.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.az.xlf index b6152e99dabc0..fbc8bb4a91aac 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.az.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.az.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Bu dəyər etibarlı bir MAC ünvanı deyil. + + This URL does not contain a TLD. + Bu URL üst səviyyəli domen (TLD) içərmir. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.be.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.be.xlf index ea7001957572b..ee481c0bcc43e 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.be.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.be.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Гэта значэнне не з'яўляецца сапраўдным MAC-адрасам. + + This URL does not contain a TLD. + Гэты URL не ўтрымлівае дамен верхняга ўзроўню (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf index 5705364f80f84..8c840db411cb4 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Тази стойност не е валиден MAC адрес. + + This URL does not contain a TLD. + Този URL адрес не съдържа домейн от най-високо ниво (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.bs.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.bs.xlf index bff1c8b441e2c..3ec56084f9c29 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.bs.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.bs.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Ova vrijednost nije valjana MAC adresa. + + This URL does not contain a TLD. + Ovaj URL ne sadrži domenu najvišeg nivoa (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf index 2f301e784ac03..f10451c7b2c6a 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Aquest valor no és una adreça MAC vàlida. + + This URL does not contain a TLD. + Aquesta URL no conté un domini de nivell superior (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf index 9ca83564ebadc..4904e2c4397d7 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Tato hodnota není platnou MAC adresou. + + This URL does not contain a TLD. + Tato URL neobsahuje doménu nejvyššího řádu (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf index fd984989e3597..748fc791d0ef6 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Nid yw'r gwerth hwn yn gyfeiriad MAC dilys. + + This URL does not contain a TLD. + Nid yw'r URL hwn yn cynnwys parth lefel uchaf (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.da.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.da.xlf index 826ef10c955db..505edad652b66 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.da.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.da.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Denne værdi er ikke en gyldig MAC-adresse. + + This URL does not contain a TLD. + Denne URL indeholder ikke et topdomæne (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf index db927e1d51e65..8bca902b799d2 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf @@ -136,7 +136,7 @@ This value is not a valid IP address. - Αυτή η IP διεύθυνση δεν είναι έγκυρη. + Αυτή η IP διεύθυνση δεν είναι έγκυρη. This value is not a valid language. @@ -320,7 +320,7 @@ This value is not a valid UUID. - Αυτός ο αριθμός δεν είναι έγκυρη UUID. + Αυτός ο αριθμός δεν είναι έγκυρη UUID. This value should be a multiple of {{ compared_value }}. @@ -438,6 +438,10 @@ This value is not a valid MAC address. Αυτός ο αριθμός δεν είναι έγκυρη διεύθυνση MAC. + + This URL does not contain a TLD. + Αυτή η διεύθυνση URL δεν περιέχει έναν τομέα ανώτατου επιπέδου (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf index abe75d5304ae3..52974ea52aa16 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Este valor no es una dirección MAC válida. + + This URL does not contain a TLD. + Esta URL no contiene un dominio de nivel superior (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf index 0af593467f591..bbacbb61391a2 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. See väärtus ei ole kehtiv MAC-aadress. + + This URL does not contain a TLD. + Sellel URL-il puudub ülataseme domeen (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf index 6094d1cbca575..518539f929f36 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Balio hau ez da MAC helbide baliozko bat. + + This URL does not contain a TLD. + URL honek ez du goi-mailako domeinurik (TLD) du. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf index 1db553c9ffb18..8f91f142d062e 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. این مقدار یک آدرس MAC معتبر نیست. + + This URL does not contain a TLD. + این URL شامل دامنه سطح بالا (TLD) نمی‌شود. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf index 324df2c276b79..38a53d511311f 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Tämä arvo ei ole kelvollinen MAC-osoite. + + This URL does not contain a TLD. + Tämä URL-osoite ei sisällä ylätason verkkotunnusta (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf index e2d747a49bffe..6194801874e7e 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Cette valeur n'est pas une adresse MAC valide. + + This URL does not contain a TLD. + Cette URL ne contient pas de domaine de premier niveau (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf index 2723983c5a99d..f097bd30858c8 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Este valor non é un enderezo MAC válido. + + This URL does not contain a TLD. + Esta URL non contén un dominio de nivel superior (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.he.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.he.xlf index b1bb894a7fe4b..2f506d39105cc 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.he.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.he.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. ערך זה אינו כתובת MAC תקפה. + + This URL does not contain a TLD. + כתובת URL זו אינה מכילה דומיין רמה עליונה (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf index eed237ce27e40..43cb98ce55c6f 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Ova vrijednost nije valjana MAC adresa. + + This URL does not contain a TLD. + Ovaj URL ne sadrži najvišu razinu domene (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf index df39afd709671..308594d9fb405 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Ez az érték nem érvényes MAC-cím. + + This URL does not contain a TLD. + Ez az URL nem tartalmaz felső szintű domain-t (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.hy.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.hy.xlf index 707301d18c037..0dc7b52f8a802 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.hy.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.hy.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Այս արժեքը վավեր MAC հասցե չէ։ + + This URL does not contain a TLD. + Այս URL-ը չունի վերին մակարդակի դոմեյն (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf index 1cc60c4d8f9a2..c6161aa4147e8 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Nilai ini bukan alamat MAC yang valid. + + This URL does not contain a TLD. + URL ini tidak mengandung domain tingkat atas (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf index bd7b25882d82c..4b5ca7a7064a0 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Questo valore non è un indirizzo MAC valido. + + This URL does not contain a TLD. + Questo URL non contiene un dominio di primo livello (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf index 0524cd0511e15..25009e129f081 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. この値は有効なMACアドレスではありません。 + + This URL does not contain a TLD. + このURLにはトップレベルドメイン(TLD)が含まれていません。 + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf index 548d82da41683..20f5dc679e285 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Dëse Wäert ass keng gülteg MAC-Adress. + + This URL does not contain a TLD. + Dësen URL enthält keng Top-Level-Domain (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf index b3ee199fe4c73..61ba74fb63c5e 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Ši vertė nėra galiojantis MAC adresas. + + This URL does not contain a TLD. + Šis URL neturi aukščiausio lygio domeno (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.mk.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.mk.xlf index 9d6dec6288b8a..31f164eee64c7 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.mk.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.mk.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Оваа вредност не е валидна MAC адреса. + + This URL does not contain a TLD. + Овој URL не содржи домен од највисоко ниво (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.mn.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.mn.xlf index 4984bb127cab1..e284b5db7e214 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.mn.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.mn.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Энэ утга хүчинтэй MAC хаяг биш юм. + + This URL does not contain a TLD. + Энэ URL нь дээд түвшингийн домейн (TLD)-гүй байна. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.my.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.my.xlf index e4858336c1c7d..58f1ff48d1f1b 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.my.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.my.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. ဤတန်ဖိုးသည် မှန်ကန်သော MAC လိပ်စာ မဟုတ်ပါ။ + + This URL does not contain a TLD. + ဤ URL သည် အမြင့်ဆုံးအဆင့်ဒိုမိန်း (TLD) မပါရှိပါ။ + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.nb.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.nb.xlf index 8b317449ef4e8..0b4c3becb15e6 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.nb.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.nb.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Denne verdien er ikke en gyldig MAC-adresse. + + This URL does not contain a TLD. + Denne URL-en inneholder ikke et toppnivådomene (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf index 81d57cab48eec..f774d6f6fc4f9 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Deze waarde is geen geldig MAC-adres. + + This URL does not contain a TLD. + Deze URL bevat geen top-level domein (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.nn.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.nn.xlf index 4e1a41dab84d7..9f2e950fda9af 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.nn.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.nn.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Denne verdien er ikkje ein gyldig MAC-adresse. + + This URL does not contain a TLD. + Denne URL-en inneheld ikkje eit toppnivådomene (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf index 8b317449ef4e8..0b4c3becb15e6 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Denne verdien er ikke en gyldig MAC-adresse. + + This URL does not contain a TLD. + Denne URL-en inneholder ikke et toppnivådomene (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf index 5861a6d1434c6..ffd79f80aca69 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Este valor não é um endereço MAC válido. + + This URL does not contain a TLD. + Esta URL não contém um domínio de topo (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf index 4372885085282..d0b10db08b525 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Este valor não é um endereço MAC válido. + + This URL does not contain a TLD. + Esta URL não contém um domínio de topo (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf index 426f6319cee20..0a785c6534786 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Această valoare nu este o adresă MAC validă. + + This URL does not contain a TLD. + Acest URL nu conține un domeniu de nivel superior (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf index 22900d5c266b5..d6628053e575e 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Это значение не является действительным MAC-адресом. + + This URL does not contain a TLD. + Этот URL не содержит домен верхнего уровня (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf index 9b06bdfb8c12e..bb9602ff5335f 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Táto hodnota nie je platnou MAC adresou. + + This URL does not contain a TLD. + Táto URL neobsahuje doménu najvyššej úrovne (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.sl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.sl.xlf index 596a66166cf4d..d5a4e01c30443 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sl.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Ta vrednost ni veljaven MAC naslov. + + This URL does not contain a TLD. + Ta URL ne vsebuje domene najvišje ravni (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf index 3ac3603144ca2..822260dbd3528 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf @@ -447,6 +447,10 @@ This value is not a valid MAC address. Kjo nuk është një adresë e vlefshme e Kontrollit të Qasjes në Media (MAC). + + This URL does not contain a TLD. + Ky URL nuk përmban një domain nivelin më të lartë (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf index b73cde9bac4a9..0b588a47dd82c 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Ова вредност није валидна MAC адреса. + + This URL does not contain a TLD. + Овај URL не садржи домен највишег нивоа (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf index cd4ccfb3f3c03..8d36355d82922 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Ova vrednost nije validna MAC adresa. + + This URL does not contain a TLD. + Ovaj URL ne sadrži domen najvišeg nivoa (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf index ec106fa78ebb7..bb20273d3fcb0 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Värdet är inte en giltig MAC-adress. + + This URL does not contain a TLD. + Denna URL innehåller inte ett toppdomän (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.th.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.th.xlf index f109024bfeaf3..d3562dc28f889 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.th.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.th.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. ค่านี้ไม่ใช่ที่อยู่ MAC ที่ถูกต้อง + + This URL does not contain a TLD. + URL นี้ไม่มีโดเมนระดับสูงสุด (TLD) อยู่. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.tl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.tl.xlf index 632efbc3f3f95..9fcc43451a2e5 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.tl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.tl.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Ang halagang ito ay hindi isang wastong MAC address. + + This URL does not contain a TLD. + Ang URL na ito ay walang top-level domain (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf index 4d66ce8bcbc58..69ff5b41fe1fa 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Bu değer geçerli bir MAC adresi değil. + + This URL does not contain a TLD. + Bu URL bir üst düzey alan adı (TLD) içermiyor. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf index fcf63e0f675f3..923c03ed0081d 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Це значення не є дійсною MAC-адресою. + + This URL does not contain a TLD. + Цей URL не містить домен верхнього рівня (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ur.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ur.xlf index 65719c64ebc4a..63bbaf3c40146 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ur.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ur.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. یہ قیمت کوئی درست MAC پتہ نہیں ہے۔ + + This URL does not contain a TLD. + یہ URL اوپری سطح کے ڈومین (TLD) کو شامل نہیں کرتا۔ + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.uz.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.uz.xlf index bf5a2d5f4d9de..9884cfea2996c 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.uz.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.uz.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Bu qiymat haqiqiy MAC manzil emas. + + This URL does not contain a TLD. + Bu URL yuqori darajali domen (TLD)ni o'z ichiga olmaydi. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf index eadf61467c8bc..01202c414dc8f 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Giá trị này không phải là địa chỉ MAC hợp lệ. + + This URL does not contain a TLD. + URL này không chứa tên miền cấp cao (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf index 155871cd38df4..6380d0a83faee 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. 该值不是有效的MAC地址。 + + This URL does not contain a TLD. + 此URL不包含顶级域名(TLD)。 + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf index 1a90678627e97..e4e32f7761545 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. 這不是一個有效的MAC地址。 + + This URL does not contain a TLD. + 此URL不含頂級域名(TLD)。 + From 38d71d692c29fcd3094c7085709587e8e49e1c6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Andr=C3=A9?= Date: Thu, 11 Apr 2024 01:22:32 +0200 Subject: [PATCH 32/95] [HttpKernel] Ensure controllers are not lazy Fix #54542 --- .../RegisterControllerArgumentLocatorsPass.php | 1 + ...egisterControllerArgumentLocatorsPassTest.php | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php index 3dbaff564194b..0bdba44b0e299 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php @@ -70,6 +70,7 @@ public function process(ContainerBuilder $container) foreach ($container->findTaggedServiceIds($this->controllerTag, true) as $id => $tags) { $def = $container->getDefinition($id); $def->setPublic(true); + $def->setLazy(false); $class = $def->getClass(); $autowire = $def->isAutowired(); $bindings = $def->getBindings(); diff --git a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php index 3dec2e912af71..40e6ea0748fc3 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php @@ -25,6 +25,7 @@ use Symfony\Component\DependencyInjection\TypedReference; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\DependencyInjection\RegisterControllerArgumentLocatorsPass; +use Symfony\Component\HttpKernel\Tests\Fixtures\DataCollector\DummyController; use Symfony\Component\HttpKernel\Tests\Fixtures\Suit; class RegisterControllerArgumentLocatorsPassTest extends TestCase @@ -285,6 +286,21 @@ public function testControllersAreMadePublic() $this->assertTrue($container->getDefinition('foo')->isPublic()); } + public function testControllersAreMadeNonLazy() + { + $container = new ContainerBuilder(); + $container->register('argument_resolver.service')->addArgument([]); + + $container->register('foo', DummyController::class) + ->addTag('controller.service_arguments') + ->setLazy(true); + + $pass = new RegisterControllerArgumentLocatorsPass(); + $pass->process($container); + + $this->assertFalse($container->getDefinition('foo')->isLazy()); + } + /** * @dataProvider provideBindings */ From 155d23f9c9a54089935b9eb024740bc38a71660e Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 11 Apr 2024 09:20:16 +0200 Subject: [PATCH 33/95] [Translation] Skip state=needs-translation entries only when source == target --- .../Component/Translation/Loader/XliffFileLoader.php | 12 ++++++++---- .../Translation/Tests/Loader/XliffFileLoaderTest.php | 11 ++++++++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Component/Translation/Loader/XliffFileLoader.php b/src/Symfony/Component/Translation/Loader/XliffFileLoader.php index fae07dbe3d958..f4d2396191fac 100644 --- a/src/Symfony/Component/Translation/Loader/XliffFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/XliffFileLoader.php @@ -111,16 +111,20 @@ private function extractXliff1(\DOMDocument $dom, MessageCatalogue $catalogue, s continue; } - if (isset($translation->target) && 'needs-translation' === (string) $translation->target->attributes()['state']) { + $source = (string) (isset($attributes['resname']) && $attributes['resname'] ? $attributes['resname'] : $translation->source); + + if (isset($translation->target) + && 'needs-translation' === (string) $translation->target->attributes()['state'] + && \in_array((string) $translation->target, [$source, (string) $translation->source], true) + ) { continue; } - $source = isset($attributes['resname']) && $attributes['resname'] ? $attributes['resname'] : $translation->source; // If the xlf file has another encoding specified, try to convert it because // simple_xml will always return utf-8 encoded values $target = $this->utf8ToCharset((string) ($translation->target ?? $translation->source), $encoding); - $catalogue->set((string) $source, $target, $domain); + $catalogue->set($source, $target, $domain); $metadata = [ 'source' => (string) $translation->source, @@ -143,7 +147,7 @@ private function extractXliff1(\DOMDocument $dom, MessageCatalogue $catalogue, s $metadata['id'] = (string) $attributes['id']; } - $catalogue->setMetadata((string) $source, $metadata, $domain); + $catalogue->setMetadata($source, $metadata, $domain); } } } diff --git a/src/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php b/src/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php index 5013d2713b181..99fa9249d7500 100644 --- a/src/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php +++ b/src/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php @@ -52,9 +52,17 @@ public function testLoadRawXliff() test - with + with note + + baz + baz + + + baz + buz + @@ -65,6 +73,7 @@ public function testLoadRawXliff() $this->assertEquals('en', $catalogue->getLocale()); $this->assertSame([], libxml_get_errors()); $this->assertContainsOnly('string', $catalogue->all('domain1')); + $this->assertSame(['foo', 'extra', 'key', 'test'], array_keys($catalogue->all('domain1'))); } public function testLoadWithInternalErrorsEnabled() From 260b834da41ceda5512c219a0ca25d1ca3550719 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 9 Apr 2024 09:34:26 +0200 Subject: [PATCH 34/95] initialize the current time with midnight before modifying the date --- src/Symfony/Component/Clock/DatePoint.php | 10 ++++++++-- .../Component/Clock/Tests/DatePointTest.php | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Clock/DatePoint.php b/src/Symfony/Component/Clock/DatePoint.php index 8749f487bcd54..c3bf3160bcd39 100644 --- a/src/Symfony/Component/Clock/DatePoint.php +++ b/src/Symfony/Component/Clock/DatePoint.php @@ -32,15 +32,21 @@ public function __construct(string $datetime = 'now', ?\DateTimeZone $timezone = if (\PHP_VERSION_ID < 80300) { try { - $timezone = (new parent($datetime, $timezone ?? $now->getTimezone()))->getTimezone(); + $builtInDate = new parent($datetime, $timezone ?? $now->getTimezone()); + $timezone = $builtInDate->getTimezone(); } catch (\Exception $e) { throw new \DateMalformedStringException($e->getMessage(), $e->getCode(), $e); } } else { - $timezone = (new parent($datetime, $timezone ?? $now->getTimezone()))->getTimezone(); + $builtInDate = new parent($datetime, $timezone ?? $now->getTimezone()); + $timezone = $builtInDate->getTimezone(); } $now = $now->setTimezone($timezone)->modify($datetime); + + if ('00:00:00.000000' === $builtInDate->format('H:i:s.u')) { + $now = $now->setTime(0, 0); + } } elseif (null !== $timezone) { $now = $now->setTimezone($timezone); } diff --git a/src/Symfony/Component/Clock/Tests/DatePointTest.php b/src/Symfony/Component/Clock/Tests/DatePointTest.php index c9d7ddf10a803..191c1195465de 100644 --- a/src/Symfony/Component/Clock/Tests/DatePointTest.php +++ b/src/Symfony/Component/Clock/Tests/DatePointTest.php @@ -57,4 +57,19 @@ public function testModify() $this->expectExceptionMessage('Failed to parse time string (Bad Date)'); $date->modify('Bad Date'); } + + /** + * @testWith ["2024-04-01 00:00:00.000000", "2024-04"] + * ["2024-04-09 00:00:00.000000", "2024-04-09"] + * ["2024-04-09 03:00:00.000000", "2024-04-09 03:00"] + * ["2024-04-09 00:00:00.123456", "2024-04-09 00:00:00.123456"] + */ + public function testTimeDefaultsToMidnight(string $expected, string $datetime) + { + $date = new \DateTimeImmutable($datetime); + $this->assertSame($expected, $date->format('Y-m-d H:i:s.u')); + + $date = new DatePoint($datetime); + $this->assertSame($expected, $date->format('Y-m-d H:i:s.u')); + } } From 6b9eb16011ac9d1918595819557b9c87bceab655 Mon Sep 17 00:00:00 2001 From: Bob van de Vijver Date: Thu, 11 Apr 2024 12:45:31 +0200 Subject: [PATCH 35/95] Improve dutch translations --- .../Resources/translations/validators.nl.xlf | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf index f774d6f6fc4f9..3d445b302c718 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf @@ -64,11 +64,11 @@ The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Het bestand is te groot ({{ size }} {{ suffix }}). Toegestane maximum grootte is {{ limit }} {{ suffix }}. + Het bestand is te groot ({{ size }} {{ suffix }}). De maximale grootte is {{ limit }} {{ suffix }}. The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Het mime type van het bestand is ongeldig ({{ type }}). Toegestane mime types zijn {{ types }}. + Het mediatype van het bestand is ongeldig ({{ type }}). De toegestane mediatypes zijn {{ types }}. This value should be {{ limit }} or less. @@ -116,7 +116,7 @@ The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Het bestand is te groot. Toegestane maximum grootte is {{ limit }} {{ suffix }}. + Het bestand is te groot. De maximale grootte is {{ limit }} {{ suffix }}. The file is too large. @@ -144,7 +144,7 @@ This value is not a valid locale. - Deze waarde is geen geldige locale. + Deze waarde is geen geldige landinstelling. This value is not a valid country. @@ -160,7 +160,7 @@ The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - De afbeelding is te breed ({{ width }}px). De maximaal toegestane breedte is {{ max_width }}px. + De afbeelding is te breed ({{ width }}px). De maximaal breedte is {{ max_width }}px. The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. @@ -168,7 +168,7 @@ The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - De afbeelding is te hoog ({{ height }}px). De maximaal toegestane hoogte is {{ max_height }}px. + De afbeelding is te hoog ({{ height }}px). De maximaal hoogte is {{ max_height }}px. The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. @@ -280,11 +280,11 @@ The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - De afbeeldingsverhouding is te groot ({{ ratio }}). Maximale verhouding is {{ max_ratio }}. + De afbeeldingsverhouding is te groot ({{ ratio }}). De maximale verhouding is {{ max_ratio }}. The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - De afbeeldingsverhouding is te klein ({{ ratio }}). Minimale verhouding is {{ min_ratio }}. + De afbeeldingsverhouding is te klein ({{ ratio }}). De minimale verhouding is {{ min_ratio }}. The image is square ({{ width }}x{{ height }}px). Square images are not allowed. @@ -324,7 +324,7 @@ This value should be a multiple of {{ compared_value }}. - Deze waarde zou een meervoud van {{ compared_value }} moeten zijn. + Deze waarde moet een meervoud van {{ compared_value }} zijn. This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. @@ -336,7 +336,7 @@ This collection should contain only unique elements. - Deze collectie moet alleen unieke elementen bevatten. + Deze collectie mag alleen unieke elementen bevatten. This value should be positive. @@ -396,7 +396,7 @@ This value is not a valid CIDR notation. - Deze waarde is geen geldige CIDR notatie. + Deze waarde is geen geldige CIDR-notatie. The value of the netmask should be between {{ min }} and {{ max }}. @@ -404,11 +404,11 @@ The filename is too long. It should have {{ filename_max_length }} character or less.|The filename is too long. It should have {{ filename_max_length }} characters or less. - De bestandsnaam is te lang. Het moet {{ filename_max_length }} karakter of minder zijn. + De bestandsnaam is te lang. Het moet {{ filename_max_length }} karakter of minder zijn.|De bestandsnaam is te lang. Het moet {{ filename_max_length }} karakters of minder zijn. The password strength is too low. Please use a stronger password. - De wachtwoordsterkte is te laag. Gebruik alstublieft een sterker wachtwoord. + Het wachtwoord is niet sterk genoeg. Probeer een sterker wachtwoord. This value contains characters that are not allowed by the current restriction-level. @@ -428,11 +428,11 @@ The extension of the file is invalid ({{ extension }}). Allowed extensions are {{ extensions }}. - De extensie van het bestand is ongeldig ({{ extension }}). Toegestane extensies zijn {{ extensions }}. + De bestandsextensie is ongeldig ({{ extension }}). De toegestane extensies zijn {{ extensions }}. The detected character encoding is invalid ({{ detected }}). Allowed encodings are {{ encodings }}. - De gedetecteerde karaktercodering is ongeldig ({{ detected }}). Toegestane coderingen zijn {{ encodings }}. + De gedetecteerde karaktercodering is ongeldig ({{ detected }}). De toegestane coderingen zijn {{ encodings }}. This value is not a valid MAC address. From df8f0cf19cb59fd9c190f9626d8b75cf29e96dd6 Mon Sep 17 00:00:00 2001 From: CarolienBEER <115483924+CarolienBEER@users.noreply.github.com> Date: Thu, 11 Apr 2024 11:27:27 +0200 Subject: [PATCH 36/95] [validator] validated Dutch translation --- .../Validator/Resources/translations/validators.nl.xlf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf index f774d6f6fc4f9..efdf1fb3c224c 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf @@ -440,7 +440,7 @@ This URL does not contain a TLD. - Deze URL bevat geen top-level domein (TLD). + Deze URL bevat geen topleveldomein (TLD). From dfac61f9d9a8d3c92ad68256c18a72cb3f8c1a07 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Thu, 11 Apr 2024 15:20:20 +0200 Subject: [PATCH 37/95] [Serializer] Use explicit nullable type --- .../Tests/Normalizer/AbstractObjectNormalizerTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php index ab9191ecafa44..44c3f9b3ed2d7 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php @@ -1035,17 +1035,17 @@ public function __construct() parent::__construct(null, new MetadataAwareNameConverter(new ClassMetadataFactory(new AttributeLoader()))); } - protected function extractAttributes(object $object, string $format = null, array $context = []): array + protected function extractAttributes(object $object, ?string $format = null, array $context = []): array { return []; } - protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []): mixed + protected function getAttributeValue(object $object, string $attribute, ?string $format = null, array $context = []): mixed { return null; } - protected function setAttributeValue(object $object, string $attribute, $value, string $format = null, array $context = []): void + protected function setAttributeValue(object $object, string $attribute, $value, ?string $format = null, array $context = []): void { $object->$attribute = $value; } From b501bba60594b9286bafcc9fdb11f69b3ec6cad6 Mon Sep 17 00:00:00 2001 From: Stephan Vock Date: Mon, 26 Feb 2024 10:53:07 +0000 Subject: [PATCH 38/95] [Security] Validate that CSRF token in form login is string similar to username/password --- .../Authenticator/FormLoginAuthenticator.php | 4 ++ .../FormLoginAuthenticatorTest.php | 48 +++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/src/Symfony/Component/Security/Http/Authenticator/FormLoginAuthenticator.php b/src/Symfony/Component/Security/Http/Authenticator/FormLoginAuthenticator.php index 3279067f50f7a..5b4de2b454d69 100644 --- a/src/Symfony/Component/Security/Http/Authenticator/FormLoginAuthenticator.php +++ b/src/Symfony/Component/Security/Http/Authenticator/FormLoginAuthenticator.php @@ -161,6 +161,10 @@ private function getCredentials(Request $request): array throw new BadRequestHttpException(sprintf('The key "%s" must be a string, "%s" given.', $this->options['password_parameter'], \gettype($credentials['password']))); } + if (!\is_string($credentials['csrf_token'] ?? '') && (!\is_object($credentials['csrf_token']) || !method_exists($credentials['csrf_token'], '__toString'))) { + throw new BadRequestHttpException(sprintf('The key "%s" must be a string, "%s" given.', $this->options['csrf_parameter'], \gettype($credentials['csrf_token']))); + } + return $credentials; } diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/FormLoginAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/FormLoginAuthenticatorTest.php index ca0dd119b89ef..83b2bdb03243e 100644 --- a/src/Symfony/Component/Security/Http/Tests/Authenticator/FormLoginAuthenticatorTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/FormLoginAuthenticatorTest.php @@ -165,6 +165,54 @@ public function __toString() $this->assertSame('s$cr$t', $credentialsBadge->getPassword()); } + /** + * @dataProvider postOnlyDataProvider + */ + public function testHandleNonStringCsrfTokenWithArray($postOnly) + { + $request = Request::create('/login_check', 'POST', ['_username' => 'foo', 'password' => 'bar', '_csrf_token' => []]); + $request->setSession($this->createSession()); + + $this->setUpAuthenticator(['post_only' => $postOnly]); + + $this->expectException(BadRequestHttpException::class); + $this->expectExceptionMessage('The key "_csrf_token" must be a string, "array" given.'); + + $this->authenticator->authenticate($request); + } + + /** + * @dataProvider postOnlyDataProvider + */ + public function testHandleNonStringCsrfTokenWithInt($postOnly) + { + $request = Request::create('/login_check', 'POST', ['_username' => 'foo', 'password' => 'bar', '_csrf_token' => 42]); + $request->setSession($this->createSession()); + + $this->setUpAuthenticator(['post_only' => $postOnly]); + + $this->expectException(BadRequestHttpException::class); + $this->expectExceptionMessage('The key "_csrf_token" must be a string, "integer" given.'); + + $this->authenticator->authenticate($request); + } + + /** + * @dataProvider postOnlyDataProvider + */ + public function testHandleNonStringCsrfTokenWithObject($postOnly) + { + $request = Request::create('/login_check', 'POST', ['_username' => 'foo', 'password' => 'bar', '_csrf_token' => new \stdClass()]); + $request->setSession($this->createSession()); + + $this->setUpAuthenticator(['post_only' => $postOnly]); + + $this->expectException(BadRequestHttpException::class); + $this->expectExceptionMessage('The key "_csrf_token" must be a string, "object" given.'); + + $this->authenticator->authenticate($request); + } + public static function postOnlyDataProvider() { yield [true]; From ce4f815abf8efff96535c882f58b7464082d9a5e Mon Sep 17 00:00:00 2001 From: uncaught Date: Fri, 12 Apr 2024 12:38:58 +0200 Subject: [PATCH 39/95] bug #51578 [Cache] always select database for persistent redis connections --- .../Cache/Tests/Traits/RedisTraitTest.php | 53 +++++++++++++++++++ .../Component/Cache/Traits/RedisTrait.php | 20 ++----- 2 files changed, 57 insertions(+), 16 deletions(-) diff --git a/src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php b/src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php index 623e1582eabf7..6efaa4487c26a 100644 --- a/src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php +++ b/src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php @@ -74,4 +74,57 @@ public static function provideCreateConnection(): array ], ]; } + + /** + * Due to a bug in phpredis, the persistent connection will keep its last selected database. So when re-using + * a persistent connection, the database has to be re-selected, too. + * + * @see https://github.com/phpredis/phpredis/issues/1920 + * + * @group integration + */ + public function testPconnectSelectsCorrectDatabase() + { + if (!class_exists(\Redis::class)) { + throw new SkippedTestSuiteError('The "Redis" class is required.'); + } + if (!getenv('REDIS_HOST')) { + throw new SkippedTestSuiteError('REDIS_HOST env var is not defined.'); + } + if (!\ini_get('redis.pconnect.pooling_enabled')) { + throw new SkippedTestSuiteError('The bug only occurs when pooling is enabled.'); + } + + // Limit the connection pool size to 1: + if (false === $prevPoolSize = ini_set('redis.pconnect.connection_limit', 1)) { + throw new SkippedTestSuiteError('Unable to set pool size'); + } + + try { + $mock = self::getObjectForTrait(RedisTrait::class); + + $dsn = 'redis://'.getenv('REDIS_HOST'); + + $cacheKey = 'testPconnectSelectsCorrectDatabase'; + $cacheValueOnDb1 = 'I should only be on database 1'; + + // First connect to database 1 and set a value there so we can identify this database: + $db1 = $mock::createConnection($dsn, ['dbindex' => 1, 'persistent' => 1]); + self::assertInstanceOf(\Redis::class, $db1); + self::assertSame(1, $db1->getDbNum()); + $db1->set($cacheKey, $cacheValueOnDb1); + self::assertSame($cacheValueOnDb1, $db1->get($cacheKey)); + + // Unset the connection - do not use `close()` or we will lose the persistent connection: + unset($db1); + + // Now connect to database 0 and see that we do not actually ended up on database 1 by checking the value: + $db0 = $mock::createConnection($dsn, ['dbindex' => 0, 'persistent' => 1]); + self::assertInstanceOf(\Redis::class, $db0); + self::assertSame(0, $db0->getDbNum()); // Redis is lying here! We could actually be on any database! + self::assertNotSame($cacheValueOnDb1, $db0->get($cacheKey)); // This value should not exist if we are actually on db 0 + } finally { + ini_set('redis.pconnect.connection_limit', $prevPoolSize); + } + } } diff --git a/src/Symfony/Component/Cache/Traits/RedisTrait.php b/src/Symfony/Component/Cache/Traits/RedisTrait.php index 8fcd7bac5a303..af6390b9bcfa5 100644 --- a/src/Symfony/Component/Cache/Traits/RedisTrait.php +++ b/src/Symfony/Component/Cache/Traits/RedisTrait.php @@ -283,7 +283,10 @@ public static function createConnection(string $dsn, array $options = []) } if ((null !== $auth && !$redis->auth($auth)) - || ($params['dbindex'] && !$redis->select($params['dbindex'])) + // Due to a bug in phpredis we must always select the dbindex if persistent pooling is enabled + // @see https://github.com/phpredis/phpredis/issues/1920 + // @see https://github.com/symfony/symfony/issues/51578 + || (($params['dbindex'] || ('pconnect' === $connect && '0' !== \ini_get('redis.pconnect.pooling_enabled'))) && !$redis->select($params['dbindex'])) ) { $e = preg_replace('/^ERR /', '', $redis->getLastError()); throw new InvalidArgumentException('Redis connection failed: '.$e.'.'); @@ -403,9 +406,6 @@ public static function createConnection(string $dsn, array $options = []) return $redis; } - /** - * {@inheritdoc} - */ protected function doFetch(array $ids) { if (!$ids) { @@ -439,17 +439,11 @@ protected function doFetch(array $ids) return $result; } - /** - * {@inheritdoc} - */ protected function doHave(string $id) { return (bool) $this->redis->exists($id); } - /** - * {@inheritdoc} - */ protected function doClear(string $namespace) { if ($this->redis instanceof \Predis\ClientInterface) { @@ -511,9 +505,6 @@ protected function doClear(string $namespace) return $cleared; } - /** - * {@inheritdoc} - */ protected function doDelete(array $ids) { if (!$ids) { @@ -548,9 +539,6 @@ protected function doDelete(array $ids) return true; } - /** - * {@inheritdoc} - */ protected function doSave(array $values, int $lifetime) { if (!$values = $this->marshaller->marshall($values, $failed)) { From 31e3bde868b01a1ef50bbfb52170b3d275e60519 Mon Sep 17 00:00:00 2001 From: Jay Klehr Date: Mon, 25 Mar 2024 11:38:47 -0600 Subject: [PATCH 40/95] [Serializer] Fixing PHP warning in the ObjectNormalizer with MaxDepth enabled --- .../Normalizer/AbstractObjectNormalizer.php | 2 +- .../Normalizer/AbstractObjectNormalizerTest.php | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php index 70b702930f207..1e4797ee78e25 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php @@ -707,7 +707,7 @@ private function updateData(array $data, string $attribute, mixed $attributeValu private function isMaxDepthReached(array $attributesMetadata, string $class, string $attribute, array &$context): bool { if (!($enableMaxDepth = $context[self::ENABLE_MAX_DEPTH] ?? $this->defaultContext[self::ENABLE_MAX_DEPTH] ?? false) - || null === $maxDepth = $attributesMetadata[$attribute]?->getMaxDepth() + || !isset($attributesMetadata[$attribute]) || null === $maxDepth = $attributesMetadata[$attribute]?->getMaxDepth() ) { return false; } diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php index 44c3f9b3ed2d7..b2d13024cdae6 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php @@ -1053,6 +1053,20 @@ protected function setAttributeValue(object $object, string $attribute, $value, $this->assertSame('scalar', $normalizer->denormalize('scalar', XmlScalarDummy::class, 'xml')->value); } + + public function testNormalizationWithMaxDepthOnStdclassObjectDoesNotThrowWarning() + { + $object = new \stdClass(); + $object->string = 'yes'; + + $classMetadataFactory = new ClassMetadataFactory(new AttributeLoader()); + $normalizer = new ObjectNormalizer($classMetadataFactory); + $normalized = $normalizer->normalize($object, context: [ + AbstractObjectNormalizer::ENABLE_MAX_DEPTH => true, + ]); + + $this->assertSame(['string' => 'yes'], $normalized); + } } class AbstractObjectNormalizerDummy extends AbstractObjectNormalizer From 457a3ded28308e71780a05ab7e14b159575e1194 Mon Sep 17 00:00:00 2001 From: Thomas Decaux Date: Mon, 26 Feb 2024 17:33:35 -0500 Subject: [PATCH 41/95] [HttpKernel] Fix datacollector caster for reference object property --- .../DataCollector/DataCollector.php | 16 ++++- .../Tests/DataCollector/DataCollectorTest.php | 66 +++++++++++++++++++ .../Tests/Fixtures/UsePropertyInDestruct.php | 16 +++++ .../Fixtures/WithPublicObjectProperty.php | 8 +++ 4 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 src/Symfony/Component/HttpKernel/Tests/Fixtures/UsePropertyInDestruct.php create mode 100644 src/Symfony/Component/HttpKernel/Tests/Fixtures/WithPublicObjectProperty.php diff --git a/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php index ccaf66da0438f..14a6f26fdedf7 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php @@ -70,9 +70,21 @@ protected function getCasters() $casters = [ '*' => function ($v, array $a, Stub $s, $isNested) { if (!$v instanceof Stub) { + $b = $a; foreach ($a as $k => $v) { - if (\is_object($v) && !$v instanceof \DateTimeInterface && !$v instanceof Stub) { - $a[$k] = new CutStub($v); + if (!\is_object($v) || $v instanceof \DateTimeInterface || $v instanceof Stub) { + continue; + } + + try { + $a[$k] = $s = new CutStub($v); + + if ($b[$k] === $s) { + // we've hit a non-typed reference + $a[$k] = $v; + } + } catch (\TypeError $e) { + // we've hit a typed reference } } } diff --git a/src/Symfony/Component/HttpKernel/Tests/DataCollector/DataCollectorTest.php b/src/Symfony/Component/HttpKernel/Tests/DataCollector/DataCollectorTest.php index ae79a3c93c504..043affeda4d7b 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/DataCollectorTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/DataCollectorTest.php @@ -15,6 +15,8 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Tests\Fixtures\DataCollector\CloneVarDataCollector; +use Symfony\Component\HttpKernel\Tests\Fixtures\UsePropertyInDestruct; +use Symfony\Component\HttpKernel\Tests\Fixtures\WithPublicObjectProperty; use Symfony\Component\VarDumper\Cloner\VarCloner; class DataCollectorTest extends TestCase @@ -35,4 +37,68 @@ public function testCloneVarExistingFilePath() $this->assertSame($filePath, $c->getData()[0]); } + + /** + * @requires PHP 8 + */ + public function testClassPublicObjectProperty() + { + $parent = new WithPublicObjectProperty(); + $child = new WithPublicObjectProperty(); + + $child->parent = $parent; + + $c = new CloneVarDataCollector($child); + $c->collect(new Request(), new Response()); + + $this->assertNotNull($c->getData()->parent); + } + + /** + * @requires PHP 8 + */ + public function testClassPublicObjectPropertyAsReference() + { + $parent = new WithPublicObjectProperty(); + $child = new WithPublicObjectProperty(); + + $child->parent = &$parent; + + $c = new CloneVarDataCollector($child); + $c->collect(new Request(), new Response()); + + $this->assertNotNull($c->getData()->parent); + } + + /** + * @requires PHP 8 + */ + public function testClassUsePropertyInDestruct() + { + $parent = new UsePropertyInDestruct(); + $child = new UsePropertyInDestruct(); + + $child->parent = $parent; + + $c = new CloneVarDataCollector($child); + $c->collect(new Request(), new Response()); + + $this->assertNotNull($c->getData()->parent); + } + + /** + * @requires PHP 8 + */ + public function testClassUsePropertyAsReferenceInDestruct() + { + $parent = new UsePropertyInDestruct(); + $child = new UsePropertyInDestruct(); + + $child->parent = &$parent; + + $c = new CloneVarDataCollector($child); + $c->collect(new Request(), new Response()); + + $this->assertNotNull($c->getData()->parent); + } } diff --git a/src/Symfony/Component/HttpKernel/Tests/Fixtures/UsePropertyInDestruct.php b/src/Symfony/Component/HttpKernel/Tests/Fixtures/UsePropertyInDestruct.php new file mode 100644 index 0000000000000..74225d355aadf --- /dev/null +++ b/src/Symfony/Component/HttpKernel/Tests/Fixtures/UsePropertyInDestruct.php @@ -0,0 +1,16 @@ +parent !== null) { + $this->parent->name = ''; + } + } +} diff --git a/src/Symfony/Component/HttpKernel/Tests/Fixtures/WithPublicObjectProperty.php b/src/Symfony/Component/HttpKernel/Tests/Fixtures/WithPublicObjectProperty.php new file mode 100644 index 0000000000000..92ebdb04dd429 --- /dev/null +++ b/src/Symfony/Component/HttpKernel/Tests/Fixtures/WithPublicObjectProperty.php @@ -0,0 +1,8 @@ + Date: Fri, 12 Apr 2024 23:03:22 +0200 Subject: [PATCH 42/95] fix low deps tests --- src/Symfony/Component/HttpKernel/composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Symfony/Component/HttpKernel/composer.json b/src/Symfony/Component/HttpKernel/composer.json index 180a79b336adc..67d5ad4b65535 100644 --- a/src/Symfony/Component/HttpKernel/composer.json +++ b/src/Symfony/Component/HttpKernel/composer.json @@ -41,6 +41,7 @@ "symfony/stopwatch": "^4.4|^5.0|^6.0", "symfony/translation": "^4.4|^5.0|^6.0", "symfony/translation-contracts": "^1.1|^2|^3", + "symfony/var-dumper": "^4.4.31|^5.4", "psr/cache": "^1.0|^2.0|^3.0", "twig/twig": "^2.13|^3.0.4" }, From 61e5476bf2db2d5ad9feeadea7f9af44baa87282 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 12 Apr 2024 23:19:15 +0200 Subject: [PATCH 43/95] explicitly mark nullable parameters as nullable --- .../Tests/Normalizer/AbstractObjectNormalizerTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php index c4e966cb6c4d9..2ca7d79fef075 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php @@ -670,17 +670,17 @@ public function __construct() parent::__construct(null, new MetadataAwareNameConverter(new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())))); } - protected function extractAttributes(object $object, string $format = null, array $context = []): array + protected function extractAttributes(object $object, ?string $format = null, array $context = []): array { return []; } - protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []) + protected function getAttributeValue(object $object, string $attribute, ?string $format = null, array $context = []) { return null; } - protected function setAttributeValue(object $object, string $attribute, $value, string $format = null, array $context = []) + protected function setAttributeValue(object $object, string $attribute, $value, ?string $format = null, array $context = []) { $object->$attribute = $value; } From 975f634a6dd3ad27cbf7d6ca40903e9d155f9775 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 13 Apr 2024 00:48:09 +0200 Subject: [PATCH 44/95] fix merge --- .../Tests/Normalizer/ObjectNormalizerTest.php | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php index c282d15a0a6ee..78dd780f855e9 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php @@ -18,7 +18,7 @@ use Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor; use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor; use Symfony\Component\PropertyInfo\PropertyInfoExtractor; -use Symfony\Component\Serializer\Annotation\Ignore; +use Symfony\Component\Serializer\Attribute\Ignore; use Symfony\Component\Serializer\Exception\LogicException; use Symfony\Component\Serializer\Exception\RuntimeException; use Symfony\Component\Serializer\Exception\UnexpectedValueException; @@ -902,26 +902,26 @@ public function testSamePropertyAsMethodWithMethodSerializedName() $this->assertSame($expected, $this->normalizer->normalize($object)); } - public function testNormalizeWithIgnoreAnnotationAndPrivateProperties() + public function testNormalizeWithIgnoreAttributeAndPrivateProperties() { - $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $classMetadataFactory = new ClassMetadataFactory(new AttributeLoader()); $normalizer = new ObjectNormalizer($classMetadataFactory); - $this->assertSame(['foo' => 'foo'], $normalizer->normalize(new ObjectDummyWithIgnoreAnnotationAndPrivateProperty())); + $this->assertSame(['foo' => 'foo'], $normalizer->normalize(new ObjectDummyWithIgnoreAttributeAndPrivateProperty())); } - public function testDenormalizeWithIgnoreAnnotationAndPrivateProperties() + public function testDenormalizeWithIgnoreAttributeAndPrivateProperties() { - $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + $classMetadataFactory = new ClassMetadataFactory(new AttributeLoader()); $normalizer = new ObjectNormalizer($classMetadataFactory); $obj = $normalizer->denormalize([ 'foo' => 'set', 'ignore' => 'set', 'private' => 'set', - ], ObjectDummyWithIgnoreAnnotationAndPrivateProperty::class); + ], ObjectDummyWithIgnoreAttributeAndPrivateProperty::class); - $expected = new ObjectDummyWithIgnoreAnnotationAndPrivateProperty(); + $expected = new ObjectDummyWithIgnoreAttributeAndPrivateProperty(); $expected->foo = 'set'; $this->assertEquals($expected, $obj); @@ -1199,11 +1199,11 @@ public function getInner() } } -class ObjectDummyWithIgnoreAnnotationAndPrivateProperty +class ObjectDummyWithIgnoreAttributeAndPrivateProperty { public $foo = 'foo'; - /** @Ignore */ + #[Ignore] public $ignored = 'ignored'; private $private = 'private'; From 6a8e99b0e9f8b6395c2bf143a26d67dcec5b4ac0 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 13 Apr 2024 00:51:45 +0200 Subject: [PATCH 45/95] add missing return type-hints --- .../Component/Serializer/Normalizer/AbstractNormalizer.php | 4 +--- .../Serializer/Normalizer/GetSetMethodNormalizer.php | 2 +- .../Component/Serializer/Normalizer/ObjectNormalizer.php | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php index 3cd4be838cee2..836b1ae0851aa 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php @@ -267,10 +267,8 @@ protected function getGroups(array $context): array /** * Is this attribute allowed? - * - * @return bool */ - protected function isAllowedAttribute(object|string $classOrObject, string $attribute, ?string $format = null, array $context = []) + protected function isAllowedAttribute(object|string $classOrObject, string $attribute, ?string $format = null, array $context = []): bool { $ignoredAttributes = $context[self::IGNORED_ATTRIBUTES] ?? $this->defaultContext[self::IGNORED_ATTRIBUTES]; if (\in_array($attribute, $ignoredAttributes)) { diff --git a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php index ba5feb74422ce..683eb04cef472 100644 --- a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php @@ -179,7 +179,7 @@ protected function setAttributeValue(object $object, string $attribute, mixed $v } } - protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = []) + protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = []): bool { if (!parent::isAllowedAttribute($classOrObject, $attribute, $format, $context)) { return false; diff --git a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php index 7814e769b7d17..213e830baf3a3 100644 --- a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php @@ -186,7 +186,7 @@ protected function getAllowedAttributes(string|object $classOrObject, array $con return $allowedAttributes; } - protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = []) + protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = []): bool { if (!parent::isAllowedAttribute($classOrObject, $attribute, $format, $context)) { return false; From ba6a65ce46813a40bce2d54ed34ba98f7df53be0 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 13 Apr 2024 00:53:04 +0200 Subject: [PATCH 46/95] fix merge --- .../Messenger/Bridge/Doctrine/Transport/Connection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php index 699510c58efc9..34b471556e403 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php @@ -298,7 +298,7 @@ public function setup(): void { $configuration = $this->driverConnection->getConfiguration(); $assetFilter = $configuration->getSchemaAssetsFilter(); - $configuration->setSchemaAssetsFilter(static fn (string $tableName) => $tableName === $this->configuration['table_name']); + $configuration->setSchemaAssetsFilter(fn (string $tableName) => $tableName === $this->configuration['table_name']); $this->updateSchema(); $configuration->setSchemaAssetsFilter($assetFilter); $this->autoSetup = false; From acd90152c84973b1f9f5997ef20226987cd8d75c Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 13 Apr 2024 08:24:47 +0200 Subject: [PATCH 47/95] clean up PHP 8.0 version checks --- .../Tests/DataCollector/DataCollectorTest.php | 12 ------------ .../Serializer/Normalizer/GetSetMethodNormalizer.php | 2 +- .../Serializer/Normalizer/ObjectNormalizer.php | 2 +- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Tests/DataCollector/DataCollectorTest.php b/src/Symfony/Component/HttpKernel/Tests/DataCollector/DataCollectorTest.php index 043affeda4d7b..4463e30e7bbb6 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/DataCollectorTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/DataCollectorTest.php @@ -38,9 +38,6 @@ public function testCloneVarExistingFilePath() $this->assertSame($filePath, $c->getData()[0]); } - /** - * @requires PHP 8 - */ public function testClassPublicObjectProperty() { $parent = new WithPublicObjectProperty(); @@ -54,9 +51,6 @@ public function testClassPublicObjectProperty() $this->assertNotNull($c->getData()->parent); } - /** - * @requires PHP 8 - */ public function testClassPublicObjectPropertyAsReference() { $parent = new WithPublicObjectProperty(); @@ -70,9 +64,6 @@ public function testClassPublicObjectPropertyAsReference() $this->assertNotNull($c->getData()->parent); } - /** - * @requires PHP 8 - */ public function testClassUsePropertyInDestruct() { $parent = new UsePropertyInDestruct(); @@ -86,9 +77,6 @@ public function testClassUsePropertyInDestruct() $this->assertNotNull($c->getData()->parent); } - /** - * @requires PHP 8 - */ public function testClassUsePropertyAsReferenceInDestruct() { $parent = new UsePropertyInDestruct(); diff --git a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php index 683eb04cef472..5916202f31c76 100644 --- a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php @@ -116,7 +116,7 @@ private function isGetMethod(\ReflectionMethod $method): bool private function isSetMethod(\ReflectionMethod $method): bool { return !$method->isStatic() - && (\PHP_VERSION_ID < 80000 || !$method->getAttributes(Ignore::class)) + && !$method->getAttributes(Ignore::class) && 1 === $method->getNumberOfRequiredParameters() && str_starts_with($method->name, 'set'); } diff --git a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php index 213e830baf3a3..0bac8eecb3a1c 100644 --- a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php @@ -216,7 +216,7 @@ private function hasAttributeAccessorMethod(string $class, string $attribute): b $method = $reflection->getMethod($attribute); return !$method->isStatic() - && (\PHP_VERSION_ID < 80000 || !$method->getAttributes(Ignore::class)) + && !$method->getAttributes(Ignore::class) && !$method->getNumberOfRequiredParameters(); } } From deb5c1f5cd63d8712b634ef6de6d622090e054c0 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 13 Apr 2024 08:46:28 +0200 Subject: [PATCH 48/95] fix password parameter name --- .../Http/Tests/Authenticator/FormLoginAuthenticatorTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/FormLoginAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/FormLoginAuthenticatorTest.php index 83b2bdb03243e..d9595e09b50f6 100644 --- a/src/Symfony/Component/Security/Http/Tests/Authenticator/FormLoginAuthenticatorTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/FormLoginAuthenticatorTest.php @@ -170,7 +170,7 @@ public function __toString() */ public function testHandleNonStringCsrfTokenWithArray($postOnly) { - $request = Request::create('/login_check', 'POST', ['_username' => 'foo', 'password' => 'bar', '_csrf_token' => []]); + $request = Request::create('/login_check', 'POST', ['_username' => 'foo', '_password' => 'bar', '_csrf_token' => []]); $request->setSession($this->createSession()); $this->setUpAuthenticator(['post_only' => $postOnly]); @@ -186,7 +186,7 @@ public function testHandleNonStringCsrfTokenWithArray($postOnly) */ public function testHandleNonStringCsrfTokenWithInt($postOnly) { - $request = Request::create('/login_check', 'POST', ['_username' => 'foo', 'password' => 'bar', '_csrf_token' => 42]); + $request = Request::create('/login_check', 'POST', ['_username' => 'foo', '_password' => 'bar', '_csrf_token' => 42]); $request->setSession($this->createSession()); $this->setUpAuthenticator(['post_only' => $postOnly]); @@ -202,7 +202,7 @@ public function testHandleNonStringCsrfTokenWithInt($postOnly) */ public function testHandleNonStringCsrfTokenWithObject($postOnly) { - $request = Request::create('/login_check', 'POST', ['_username' => 'foo', 'password' => 'bar', '_csrf_token' => new \stdClass()]); + $request = Request::create('/login_check', 'POST', ['_username' => 'foo', '_password' => 'bar', '_csrf_token' => new \stdClass()]); $request->setSession($this->createSession()); $this->setUpAuthenticator(['post_only' => $postOnly]); From 210e9e49089d065e2e2f3f4ee90c75155e94ac86 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 13 Apr 2024 09:04:03 +0200 Subject: [PATCH 49/95] skip test assertions that are no longer valid with PHP >= 8.2.18/8.3.5 --- .../Tests/Hasher/NativePasswordHasherTest.php | 6 +++++- .../Tests/Hasher/SodiumPasswordHasherTest.php | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/PasswordHasher/Tests/Hasher/NativePasswordHasherTest.php b/src/Symfony/Component/PasswordHasher/Tests/Hasher/NativePasswordHasherTest.php index 5dc301916eed3..4cf708b806296 100644 --- a/src/Symfony/Component/PasswordHasher/Tests/Hasher/NativePasswordHasherTest.php +++ b/src/Symfony/Component/PasswordHasher/Tests/Hasher/NativePasswordHasherTest.php @@ -103,7 +103,11 @@ public function testBcryptWithNulByte() $hasher = new NativePasswordHasher(null, null, 4, \PASSWORD_BCRYPT); $plainPassword = "a\0b"; - $this->assertFalse($hasher->verify(password_hash($plainPassword, \PASSWORD_BCRYPT, ['cost' => 4]), $plainPassword)); + if (\PHP_VERSION_ID < 80218 || \PHP_VERSION_ID >= 80300 && \PHP_VERSION_ID < 80305) { + // password_hash() does not accept passwords containing NUL bytes since PHP 8.2.18 and 8.3.5 + $this->assertFalse($hasher->verify(password_hash($plainPassword, \PASSWORD_BCRYPT, ['cost' => 4]), $plainPassword)); + } + $this->assertTrue($hasher->verify($hasher->hash($plainPassword), $plainPassword)); } diff --git a/src/Symfony/Component/PasswordHasher/Tests/Hasher/SodiumPasswordHasherTest.php b/src/Symfony/Component/PasswordHasher/Tests/Hasher/SodiumPasswordHasherTest.php index 3dc97c768f6f1..101c09fc46ed3 100644 --- a/src/Symfony/Component/PasswordHasher/Tests/Hasher/SodiumPasswordHasherTest.php +++ b/src/Symfony/Component/PasswordHasher/Tests/Hasher/SodiumPasswordHasherTest.php @@ -78,7 +78,11 @@ public function testBcryptWithNulByte() $hasher = new SodiumPasswordHasher(null, null); $plainPassword = "a\0b"; - $this->assertFalse($hasher->verify(password_hash($plainPassword, \PASSWORD_BCRYPT, ['cost' => 4]), $plainPassword)); + if (\PHP_VERSION_ID < 80218 || \PHP_VERSION_ID >= 80300 && \PHP_VERSION_ID < 80305) { + // password_hash() does not accept passwords containing NUL bytes since PHP 8.2.18 and 8.3.5 + $this->assertFalse($hasher->verify(password_hash($plainPassword, \PASSWORD_BCRYPT, ['cost' => 4]), $plainPassword)); + } + $this->assertTrue($hasher->verify((new NativePasswordHasher(null, null, 4, \PASSWORD_BCRYPT))->hash($plainPassword), $plainPassword)); } From 2fed72f044f3880118f5d0ed5265d4dfa269605a Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 13 Apr 2024 21:26:18 +0200 Subject: [PATCH 50/95] sync .github/expected-missing-return-types.diff --- .github/expected-missing-return-types.diff | 14 ++++++++++++++ .../Serializer/Normalizer/AbstractNormalizer.php | 2 +- .../Normalizer/GetSetMethodNormalizer.php | 2 +- .../Serializer/Normalizer/ObjectNormalizer.php | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/expected-missing-return-types.diff b/.github/expected-missing-return-types.diff index 0aee6685a711f..73d86100bdd53 100644 --- a/.github/expected-missing-return-types.diff +++ b/.github/expected-missing-return-types.diff @@ -11632,6 +11632,13 @@ diff --git a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer. + protected function setAttributeValue(object $object, string $attribute, mixed $value, ?string $format = null, array $context = []): void { $setter = 'set'.ucfirst($attribute); +@@ -182,5 +182,5 @@ class GetSetMethodNormalizer extends AbstractObjectNormalizer + } + +- protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = []) ++ protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = []): bool + { + if (!parent::isAllowedAttribute($classOrObject, $attribute, $format, $context)) { diff --git a/src/Symfony/Component/Serializer/Normalizer/NormalizerAwareInterface.php b/src/Symfony/Component/Serializer/Normalizer/NormalizerAwareInterface.php --- a/src/Symfony/Component/Serializer/Normalizer/NormalizerAwareInterface.php +++ b/src/Symfony/Component/Serializer/Normalizer/NormalizerAwareInterface.php @@ -11678,6 +11685,13 @@ diff --git a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php b/ + protected function setAttributeValue(object $object, string $attribute, mixed $value, ?string $format = null, array $context = []): void { try { +@@ -189,5 +189,5 @@ class ObjectNormalizer extends AbstractObjectNormalizer + } + +- protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = []) ++ protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = []): bool + { + $ignoredAttributes = $context[self::IGNORED_ATTRIBUTES] ?? $this->defaultContext[self::IGNORED_ATTRIBUTES]; diff --git a/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php --- a/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php index 836b1ae0851aa..9df372d170511 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php @@ -268,7 +268,7 @@ protected function getGroups(array $context): array /** * Is this attribute allowed? */ - protected function isAllowedAttribute(object|string $classOrObject, string $attribute, ?string $format = null, array $context = []): bool + protected function isAllowedAttribute(object|string $classOrObject, string $attribute, ?string $format = null, array $context = []) { $ignoredAttributes = $context[self::IGNORED_ATTRIBUTES] ?? $this->defaultContext[self::IGNORED_ATTRIBUTES]; if (\in_array($attribute, $ignoredAttributes)) { diff --git a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php index 5916202f31c76..0306ad1a18df3 100644 --- a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php @@ -179,7 +179,7 @@ protected function setAttributeValue(object $object, string $attribute, mixed $v } } - protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = []): bool + protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = []) { if (!parent::isAllowedAttribute($classOrObject, $attribute, $format, $context)) { return false; diff --git a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php index 0bac8eecb3a1c..6e7d9d7b8ecc8 100644 --- a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php @@ -186,7 +186,7 @@ protected function getAllowedAttributes(string|object $classOrObject, array $con return $allowedAttributes; } - protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = []): bool + protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = []) { if (!parent::isAllowedAttribute($classOrObject, $attribute, $format, $context)) { return false; From 366604d5e02f47d6218a5c693b1fe542c96fd371 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 14 Apr 2024 13:10:41 +0200 Subject: [PATCH 51/95] implement NodeVisitorInterface instead of extending AbstractNodeVisitor --- .../TranslationDefaultDomainNodeVisitor.php | 14 ++++---------- .../Twig/NodeVisitor/TranslationNodeVisitor.php | 14 ++++---------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php index 213365ed9f1ef..7570126fa80eb 100644 --- a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php +++ b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php @@ -23,12 +23,12 @@ use Twig\Node\ModuleNode; use Twig\Node\Node; use Twig\Node\SetNode; -use Twig\NodeVisitor\AbstractNodeVisitor; +use Twig\NodeVisitor\NodeVisitorInterface; /** * @author Fabien Potencier */ -final class TranslationDefaultDomainNodeVisitor extends AbstractNodeVisitor +final class TranslationDefaultDomainNodeVisitor implements NodeVisitorInterface { private $scope; @@ -37,10 +37,7 @@ public function __construct() $this->scope = new Scope(); } - /** - * {@inheritdoc} - */ - protected function doEnterNode(Node $node, Environment $env): Node + public function enterNode(Node $node, Environment $env): Node { if ($node instanceof BlockNode || $node instanceof ModuleNode) { $this->scope = $this->scope->enter(); @@ -86,10 +83,7 @@ protected function doEnterNode(Node $node, Environment $env): Node return $node; } - /** - * {@inheritdoc} - */ - protected function doLeaveNode(Node $node, Environment $env): ?Node + public function leaveNode(Node $node, Environment $env): ?Node { if ($node instanceof TransDefaultDomainNode) { return null; diff --git a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php index ac0ccd21cdd37..39cd4b142af10 100644 --- a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php +++ b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php @@ -18,14 +18,14 @@ use Twig\Node\Expression\FilterExpression; use Twig\Node\Expression\FunctionExpression; use Twig\Node\Node; -use Twig\NodeVisitor\AbstractNodeVisitor; +use Twig\NodeVisitor\NodeVisitorInterface; /** * TranslationNodeVisitor extracts translation messages. * * @author Fabien Potencier */ -final class TranslationNodeVisitor extends AbstractNodeVisitor +final class TranslationNodeVisitor implements NodeVisitorInterface { public const UNDEFINED_DOMAIN = '_undefined'; @@ -49,10 +49,7 @@ public function getMessages(): array return $this->messages; } - /** - * {@inheritdoc} - */ - protected function doEnterNode(Node $node, Environment $env): Node + public function enterNode(Node $node, Environment $env): Node { if (!$this->enabled) { return $node; @@ -101,10 +98,7 @@ protected function doEnterNode(Node $node, Environment $env): Node return $node; } - /** - * {@inheritdoc} - */ - protected function doLeaveNode(Node $node, Environment $env): ?Node + public function leaveNode(Node $node, Environment $env): ?Node { return $node; } From 50acbe69d02e1c626a3048f2b603e7a403426378 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 16 Apr 2024 10:45:54 +0200 Subject: [PATCH 52/95] Adjust pretty name of closures on PHP 8.4 --- .../FrameworkBundle/Console/Descriptor/JsonDescriptor.php | 2 +- .../FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php | 2 +- .../FrameworkBundle/Console/Descriptor/TextDescriptor.php | 2 +- .../Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php | 2 +- .../Bundle/SecurityBundle/Command/DebugFirewallCommand.php | 2 +- src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php | 2 +- src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php | 2 +- .../HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php | 2 +- .../Component/HttpKernel/DataCollector/RequestDataCollector.php | 2 +- .../HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php | 2 +- src/Symfony/Component/Messenger/Handler/HandlerDescriptor.php | 2 +- src/Symfony/Component/String/LazyString.php | 2 +- src/Symfony/Component/String/Tests/LazyStringTest.php | 2 +- src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php index 585af1eefd539..e25ee21d72a8f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php @@ -356,7 +356,7 @@ private function getCallableData($callable): array $data['type'] = 'closure'; $r = new \ReflectionFunction($callable); - if (str_contains($r->name, '{closure}')) { + if (str_contains($r->name, '{closure')) { return $data; } $data['name'] = $r->name; diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php index f23be9d579952..12ab4d4f73435 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php @@ -372,7 +372,7 @@ protected function describeCallable($callable, array $options = []) $string .= "\n- Type: `closure`"; $r = new \ReflectionFunction($callable); - if (str_contains($r->name, '{closure}')) { + if (str_contains($r->name, '{closure')) { return $this->write($string."\n"); } $string .= "\n".sprintf('- Name: `%s`', $r->name); diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php index 39dc8fb210ab7..f2e7cee78c486 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php @@ -611,7 +611,7 @@ private function formatCallable($callable): string if ($callable instanceof \Closure) { $r = new \ReflectionFunction($callable); - if (str_contains($r->name, '{closure}')) { + if (str_contains($r->name, '{closure')) { return 'Closure()'; } if ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php index 56b1af9bf6c64..8daf880f3043c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php @@ -543,7 +543,7 @@ private function getCallableDocument($callable): \DOMDocument $callableXML->setAttribute('type', 'closure'); $r = new \ReflectionFunction($callable); - if (str_contains($r->name, '{closure}')) { + if (str_contains($r->name, '{closure')) { return $dom; } $callableXML->setAttribute('name', $r->name); diff --git a/src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php b/src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php index 3757c5657ae4a..6fc6a0ed95f88 100644 --- a/src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php +++ b/src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php @@ -252,7 +252,7 @@ private function formatCallable($callable): string if ($callable instanceof \Closure) { $r = new \ReflectionFunction($callable); - if (false !== strpos($r->name, '{closure}')) { + if (str_contains($r->name, '{closure')) { return 'Closure()'; } if ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { diff --git a/src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php b/src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php index 75a91d9e221cc..2b625f6388af3 100644 --- a/src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php +++ b/src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php @@ -171,7 +171,7 @@ public function testCallErrorExceptionInfo() } $this->assertSame(__FILE__, $e->getFile()); $this->assertSame(0, $e->getCode()); - $this->assertSame('Symfony\Component\ErrorHandler\{closure}', $trace[0]['function']); + $this->assertStringMatchesFormat('%A{closure%A}', $trace[0]['function']); $this->assertSame(ErrorHandler::class, $trace[0]['class']); $this->assertSame('triggerNotice', $trace[1]['function']); $this->assertSame(__CLASS__, $trace[1]['class']); diff --git a/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php b/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php index 80d49a168b701..792c175613501 100644 --- a/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php +++ b/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php @@ -47,7 +47,7 @@ public function __construct($listener, ?string $name, Stopwatch $stopwatch, ?Eve $this->pretty = $this->name.'::'.$listener[1]; } elseif ($listener instanceof \Closure) { $r = new \ReflectionFunction($listener); - if (str_contains($r->name, '{closure}')) { + if (str_contains($r->name, '{closure')) { $this->pretty = $this->name = 'closure'; } elseif ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { $this->name = $class->name; diff --git a/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php b/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php index 85bb805f34bb6..00e673349e67c 100644 --- a/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php +++ b/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php @@ -33,7 +33,7 @@ public function createArgumentMetadata($controller): array $class = $reflection->class; } else { $reflection = new \ReflectionFunction($controller); - if ($class = str_contains($reflection->name, '{closure}') ? null : (\PHP_VERSION_ID >= 80111 ? $reflection->getClosureCalledClass() : $reflection->getClosureScopeClass())) { + if ($class = str_contains($reflection->name, '{closure') ? null : (\PHP_VERSION_ID >= 80111 ? $reflection->getClosureCalledClass() : $reflection->getClosureScopeClass())) { $class = $class->name; } } diff --git a/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php index c56013c2eaad8..6931336f06d17 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php @@ -474,7 +474,7 @@ private function parseController($controller) 'line' => $r->getStartLine(), ]; - if (str_contains($r->name, '{closure}')) { + if (str_contains($r->name, '{closure')) { return $controller; } $controller['method'] = $r->name; diff --git a/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php b/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php index becb9b01bfd0a..e08758cf730e0 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php @@ -118,7 +118,7 @@ public static function provideControllerCallables(): array 'Closure', function () { return 'foo'; }, [ - 'class' => __NAMESPACE__.'\{closure}', + 'class' => \PHP_VERSION_ID >= 80400 ? sprintf('{closure:%s():%d}', __METHOD__, __LINE__ - 2) : __NAMESPACE__.'\{closure}', 'method' => null, 'file' => __FILE__, 'line' => __LINE__ - 5, diff --git a/src/Symfony/Component/Messenger/Handler/HandlerDescriptor.php b/src/Symfony/Component/Messenger/Handler/HandlerDescriptor.php index 5957e3f13823b..20d2c2043a7e7 100644 --- a/src/Symfony/Component/Messenger/Handler/HandlerDescriptor.php +++ b/src/Symfony/Component/Messenger/Handler/HandlerDescriptor.php @@ -34,7 +34,7 @@ public function __construct(callable $handler, array $options = []) $r = new \ReflectionFunction($handler); - if (str_contains($r->name, '{closure}')) { + if (str_contains($r->name, '{closure')) { $this->name = 'Closure'; } elseif (!$handler = $r->getClosureThis()) { $class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass(); diff --git a/src/Symfony/Component/String/LazyString.php b/src/Symfony/Component/String/LazyString.php index 9c7a9c58b659b..5f7e7370d78d8 100644 --- a/src/Symfony/Component/String/LazyString.php +++ b/src/Symfony/Component/String/LazyString.php @@ -148,7 +148,7 @@ private static function getPrettyName(callable $callback): string } elseif ($callback instanceof \Closure) { $r = new \ReflectionFunction($callback); - if (false !== strpos($r->name, '{closure}') || !$class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { + if (str_contains($r->name, '{closure') || !$class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { return $r->name; } diff --git a/src/Symfony/Component/String/Tests/LazyStringTest.php b/src/Symfony/Component/String/Tests/LazyStringTest.php index c311a3be9ff06..02601b6faaf16 100644 --- a/src/Symfony/Component/String/Tests/LazyStringTest.php +++ b/src/Symfony/Component/String/Tests/LazyStringTest.php @@ -65,7 +65,7 @@ public function testReturnTypeError() $s = LazyString::fromCallable(function () { return []; }); $this->expectException(\TypeError::class); - $this->expectExceptionMessage('Return value of '.__NAMESPACE__.'\{closure}() passed to '.LazyString::class.'::fromCallable() must be of the type string, array returned.'); + $this->expectExceptionMessageMatches('{^Return value of .*\{closure.*\}\(\) passed to '.preg_quote(LazyString::class).'::fromCallable\(\) must be of the type string, array returned\.$}'); (string) $s; } diff --git a/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php b/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php index 6f1b8f2f25a5e..35fd1e8a99b2b 100644 --- a/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php +++ b/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php @@ -42,7 +42,7 @@ public static function castClosure(\Closure $c, array $a, Stub $stub, bool $isNe $a = static::castFunctionAbstract($c, $a, $stub, $isNested, $filter); - if (!str_contains($c->name, '{closure}')) { + if (!str_contains($c->name, '{closure')) { $stub->class = isset($a[$prefix.'class']) ? $a[$prefix.'class']->value.'::'.$c->name : $c->name; unset($a[$prefix.'class']); } From 9189c8cd94add9d25e44d21f61dc5c27d1552ede Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 16 Apr 2024 16:33:04 +0200 Subject: [PATCH 53/95] Bump ext-redis in CI on PHP >= 8.4 --- .github/workflows/unit-tests.yml | 3 ++- .../Redis/Tests/Transport/ConnectionTest.php | 14 +++++++------- .../Bridge/Redis/Transport/Connection.php | 1 + 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 159abdf72ac02..969835cccdde1 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -34,6 +34,7 @@ jobs: mode: low-deps - php: '8.3' - php: '8.4' + extensions: amqp,apcu,igbinary,intl,mbstring,memcached,redis #mode: experimental fail-fast: false @@ -51,7 +52,7 @@ jobs: coverage: "none" ini-values: date.timezone=UTC,memory_limit=-1,default_socket_timeout=10,session.gc_probability=0,apc.enable_cli=1,zend.assertions=1 php-version: "${{ matrix.php }}" - extensions: "${{ env.extensions }}" + extensions: "${{ matrix.extensions || env.extensions }}" tools: flex - name: Configure environment diff --git a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php index 71ccea4c1752e..2e5c7bf0b043e 100644 --- a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php @@ -154,7 +154,7 @@ public function testKeepGettingPendingMessages() $redis = $this->createMock(\Redis::class); $redis->expects($this->exactly(3))->method('xreadgroup') - ->with('symfony', 'consumer', ['queue' => 0], 1, null) + ->with('symfony', 'consumer', ['queue' => 0], 1, 1) ->willReturn(['queue' => [['message' => json_encode(['body' => 'Test', 'headers' => []])]]]); $connection = Connection::fromDsn('redis://localhost/queue', ['delete_after_ack' => true], $redis); @@ -250,7 +250,7 @@ public function testGetPendingMessageFirst() $redis = $this->createMock(\Redis::class); $redis->expects($this->exactly(1))->method('xreadgroup') - ->with('symfony', 'consumer', ['queue' => '0'], 1, null) + ->with('symfony', 'consumer', ['queue' => '0'], 1, 1) ->willReturn(['queue' => [['message' => '{"body":"1","headers":[]}']]]); $connection = Connection::fromDsn('redis://localhost/queue', ['delete_after_ack' => true], $redis); @@ -275,11 +275,11 @@ public function testClaimAbandonedMessageWithRaceCondition() ->willReturnCallback(function (...$args) { static $series = [ // first call for pending messages - [['symfony', 'consumer', ['queue' => '0'], 1, null], []], + [['symfony', 'consumer', ['queue' => '0'], 1, 1], []], // second call because of claimed message (redisid-123) - [['symfony', 'consumer', ['queue' => '0'], 1, null], []], + [['symfony', 'consumer', ['queue' => '0'], 1, 1], []], // third call because of no result (other consumer claimed message redisid-123) - [['symfony', 'consumer', ['queue' => '>'], 1, null], []], + [['symfony', 'consumer', ['queue' => '>'], 1, 1], []], ]; [$expectedArgs, $return] = array_shift($series); @@ -311,9 +311,9 @@ public function testClaimAbandonedMessage() ->willReturnCallback(function (...$args) { static $series = [ // first call for pending messages - [['symfony', 'consumer', ['queue' => '0'], 1, null], []], + [['symfony', 'consumer', ['queue' => '0'], 1, 1], []], // second call because of claimed message (redisid-123) - [['symfony', 'consumer', ['queue' => '0'], 1, null], ['queue' => [['message' => '{"body":"1","headers":[]}']]]], + [['symfony', 'consumer', ['queue' => '0'], 1, 1], ['queue' => [['message' => '{"body":"1","headers":[]}']]]], ]; [$expectedArgs, $return] = array_shift($series); diff --git a/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php b/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php index 16633a354fcfe..f0c7188b3754e 100644 --- a/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php +++ b/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php @@ -389,6 +389,7 @@ public function get(): ?array $this->group, $this->consumer, [$this->stream => $messageId], + 1, 1 ); } catch (\RedisException $e) { From 132b4719fe8eaecb09610d574fa7d4cab0c37e8a Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 16 Apr 2024 17:42:30 +0200 Subject: [PATCH 54/95] Fix CI --- .../Component/Cache/Tests/Traits/RedisTraitTest.php | 12 +++++++++--- .../Component/Filesystem/Tests/FilesystemTest.php | 4 ++-- .../Component/Mime/Tests/Part/DataPartTest.php | 4 ++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php b/src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php index 6efaa4487c26a..650a0c71c1c2e 100644 --- a/src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php +++ b/src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php @@ -32,7 +32,9 @@ public function testCreateConnection(string $dsn, string $expectedClass) throw new SkippedTestSuiteError('REDIS_CLUSTER_HOSTS env var is not defined.'); } - $mock = self::getObjectForTrait(RedisTrait::class); + $mock = new class () { + use RedisTrait; + }; $connection = $mock::createConnection($dsn); self::assertInstanceOf($expectedClass, $connection); @@ -44,7 +46,9 @@ public function testUrlDecodeParameters() self::markTestSkipped('REDIS_AUTHENTICATED_HOST env var is not defined.'); } - $mock = self::getObjectForTrait(RedisTrait::class); + $mock = new class () { + use RedisTrait; + }; $connection = $mock::createConnection('redis://:p%40ssword@'.getenv('REDIS_AUTHENTICATED_HOST')); self::assertInstanceOf(\Redis::class, $connection); @@ -101,7 +105,9 @@ public function testPconnectSelectsCorrectDatabase() } try { - $mock = self::getObjectForTrait(RedisTrait::class); + $mock = new class () { + use RedisTrait; + }; $dsn = 'redis://'.getenv('REDIS_HOST'); diff --git a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php index 47c89995f7895..101f30f898714 100644 --- a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php +++ b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php @@ -171,14 +171,14 @@ public function testCopyForOriginUrlsAndExistingLocalFileDefaultsToCopy() } $finder = new PhpExecutableFinder(); - $process = new Process(array_merge([$finder->find(false)], $finder->findArguments(), ['-dopcache.enable=0', '-dvariables_order=EGPCS', '-S', '127.0.0.1:8057'])); + $process = new Process(array_merge([$finder->find(false)], $finder->findArguments(), ['-dopcache.enable=0', '-dvariables_order=EGPCS', '-S', 'localhost:8057'])); $process->setWorkingDirectory(__DIR__.'/Fixtures/web'); $process->start(); do { usleep(50000); - } while (!@fopen('http://127.0.0.1:8057', 'r')); + } while (!@fopen('http://localhost:8057', 'r')); try { $sourceFilePath = 'http://localhost:8057/logo_symfony_header.png'; diff --git a/src/Symfony/Component/Mime/Tests/Part/DataPartTest.php b/src/Symfony/Component/Mime/Tests/Part/DataPartTest.php index 361bb00be5d19..3d306f2e8ff86 100644 --- a/src/Symfony/Component/Mime/Tests/Part/DataPartTest.php +++ b/src/Symfony/Component/Mime/Tests/Part/DataPartTest.php @@ -143,14 +143,14 @@ public function testFromPathWithUrl() } $finder = new PhpExecutableFinder(); - $process = new Process(array_merge([$finder->find(false)], $finder->findArguments(), ['-dopcache.enable=0', '-dvariables_order=EGPCS', '-S', '127.0.0.1:8057'])); + $process = new Process(array_merge([$finder->find(false)], $finder->findArguments(), ['-dopcache.enable=0', '-dvariables_order=EGPCS', '-S', 'localhost:8057'])); $process->setWorkingDirectory(__DIR__.'/../Fixtures/web'); $process->start(); try { do { usleep(50000); - } while (!@fopen('http://127.0.0.1:8057', 'r')); + } while (!@fopen('http://localhost:8057', 'r')); $p = DataPart::fromPath($file = 'http://localhost:8057/logo_symfony_header.png'); $content = file_get_contents($file); $this->assertEquals($content, $p->getBody()); From 5c0ebc92bf5da0e5a7ae008d06cb76dc1e0b81e5 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 16 Apr 2024 18:32:13 +0200 Subject: [PATCH 55/95] Fix test --- .../Serializer/Tests/Normalizer/ObjectNormalizerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php index eff523b367f98..f3ac1ef841c62 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php @@ -1120,7 +1120,7 @@ public function __get($name) } } - public function __isset($name) + public function __isset($name): bool { return 'foo' === $name; } From a573eabca6005f07c67692d6bec33394071e110f Mon Sep 17 00:00:00 2001 From: Soner Sayakci Date: Tue, 16 Apr 2024 20:50:31 +0200 Subject: [PATCH 56/95] [Intl] Remove resources data from classmap generation --- src/Symfony/Component/Intl/composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Intl/composer.json b/src/Symfony/Component/Intl/composer.json index 4e1fe6c63e501..699d53199698b 100644 --- a/src/Symfony/Component/Intl/composer.json +++ b/src/Symfony/Component/Intl/composer.json @@ -37,7 +37,8 @@ "classmap": [ "Resources/stubs" ], "files": [ "Resources/functions.php" ], "exclude-from-classmap": [ - "/Tests/" + "/Tests/", + "/Resources/data/" ] }, "minimum-stability": "dev" From a2f4d8347729c276e1501f762031ea6d2a89c576 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 17 Apr 2024 09:30:55 +0200 Subject: [PATCH 57/95] [Validator] Update message translations for unit 113 (TLD) --- .../Validator/Resources/translations/validators.af.xlf | 4 ++-- .../Validator/Resources/translations/validators.ar.xlf | 4 ++-- .../Validator/Resources/translations/validators.az.xlf | 4 ++-- .../Validator/Resources/translations/validators.be.xlf | 4 ++-- .../Validator/Resources/translations/validators.bg.xlf | 4 ++-- .../Validator/Resources/translations/validators.bs.xlf | 4 ++-- .../Validator/Resources/translations/validators.ca.xlf | 4 ++-- .../Validator/Resources/translations/validators.cs.xlf | 4 ++-- .../Validator/Resources/translations/validators.cy.xlf | 4 ++-- .../Validator/Resources/translations/validators.da.xlf | 4 ++-- .../Validator/Resources/translations/validators.de.xlf | 4 ++-- .../Validator/Resources/translations/validators.el.xlf | 4 ++-- .../Validator/Resources/translations/validators.en.xlf | 4 ++-- .../Validator/Resources/translations/validators.es.xlf | 4 ++-- .../Validator/Resources/translations/validators.et.xlf | 4 ++-- .../Validator/Resources/translations/validators.eu.xlf | 4 ++-- .../Validator/Resources/translations/validators.fa.xlf | 4 ++-- .../Validator/Resources/translations/validators.fi.xlf | 4 ++-- .../Validator/Resources/translations/validators.fr.xlf | 4 ++-- .../Validator/Resources/translations/validators.gl.xlf | 4 ++-- .../Validator/Resources/translations/validators.he.xlf | 4 ++-- .../Validator/Resources/translations/validators.hr.xlf | 4 ++-- .../Validator/Resources/translations/validators.hu.xlf | 4 ++-- .../Validator/Resources/translations/validators.hy.xlf | 4 ++-- .../Validator/Resources/translations/validators.id.xlf | 4 ++-- .../Validator/Resources/translations/validators.it.xlf | 4 ++-- .../Validator/Resources/translations/validators.ja.xlf | 4 ++-- .../Validator/Resources/translations/validators.lb.xlf | 4 ++-- .../Validator/Resources/translations/validators.lt.xlf | 4 ++-- .../Validator/Resources/translations/validators.lv.xlf | 4 ++-- .../Validator/Resources/translations/validators.mk.xlf | 4 ++-- .../Validator/Resources/translations/validators.mn.xlf | 4 ++-- .../Validator/Resources/translations/validators.my.xlf | 4 ++-- .../Validator/Resources/translations/validators.nb.xlf | 4 ++-- .../Validator/Resources/translations/validators.nl.xlf | 4 ++-- .../Validator/Resources/translations/validators.nn.xlf | 4 ++-- .../Validator/Resources/translations/validators.no.xlf | 4 ++-- .../Validator/Resources/translations/validators.pl.xlf | 4 ++-- .../Validator/Resources/translations/validators.pt.xlf | 4 ++-- .../Validator/Resources/translations/validators.pt_BR.xlf | 4 ++-- .../Validator/Resources/translations/validators.ro.xlf | 4 ++-- .../Validator/Resources/translations/validators.ru.xlf | 4 ++-- .../Validator/Resources/translations/validators.sk.xlf | 4 ++-- .../Validator/Resources/translations/validators.sl.xlf | 4 ++-- .../Validator/Resources/translations/validators.sq.xlf | 4 ++-- .../Validator/Resources/translations/validators.sr_Cyrl.xlf | 4 ++-- .../Validator/Resources/translations/validators.sr_Latn.xlf | 4 ++-- .../Validator/Resources/translations/validators.sv.xlf | 4 ++-- .../Validator/Resources/translations/validators.th.xlf | 4 ++-- .../Validator/Resources/translations/validators.tl.xlf | 4 ++-- .../Validator/Resources/translations/validators.tr.xlf | 4 ++-- .../Validator/Resources/translations/validators.uk.xlf | 4 ++-- .../Validator/Resources/translations/validators.ur.xlf | 4 ++-- .../Validator/Resources/translations/validators.uz.xlf | 4 ++-- .../Validator/Resources/translations/validators.vi.xlf | 4 ++-- .../Validator/Resources/translations/validators.zh_CN.xlf | 4 ++-- .../Validator/Resources/translations/validators.zh_TW.xlf | 4 ++-- 57 files changed, 114 insertions(+), 114 deletions(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf index 64ce4f8c9ef8f..f975fc5164edb 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf @@ -439,8 +439,8 @@ Hierdie waarde is nie 'n geldige MAC-adres nie. - This URL does not contain a TLD. - Hierdie URL bevat nie 'n topvlakdomein (TLD) nie. + This URL is missing a top-level domain. + Die URL mis 'n topvlakdomein. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf index 6d78ca77a217d..a96cce98048e4 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf @@ -439,8 +439,8 @@ هذه القيمة ليست عنوان MAC صالحًا. - This URL does not contain a TLD. - هذا الرابط لا يحتوي على نطاق أعلى مستوى (TLD). + This URL is missing a top-level domain. + هذا الرابط يفتقر إلى نطاق أعلى مستوى. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.az.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.az.xlf index fbc8bb4a91aac..2eeae5f8a69ce 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.az.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.az.xlf @@ -439,8 +439,8 @@ Bu dəyər etibarlı bir MAC ünvanı deyil. - This URL does not contain a TLD. - Bu URL üst səviyyəli domen (TLD) içərmir. + This URL is missing a top-level domain. + Bu URL yuxarı səviyyəli domeni çatışmır. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.be.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.be.xlf index ee481c0bcc43e..a0665388e4bee 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.be.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.be.xlf @@ -439,8 +439,8 @@ Гэта значэнне не з'яўляецца сапраўдным MAC-адрасам. - This URL does not contain a TLD. - Гэты URL не ўтрымлівае дамен верхняга ўзроўню (TLD). + This URL is missing a top-level domain. + Гэтаму URL бракуе дамен верхняга ўзроўню. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf index 8c840db411cb4..de24ec5eb0c4d 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf @@ -439,8 +439,8 @@ Тази стойност не е валиден MAC адрес. - This URL does not contain a TLD. - Този URL адрес не съдържа домейн от най-високо ниво (TLD). + This URL is missing a top-level domain. + На този URL липсва домейн от най-високо ниво. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.bs.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.bs.xlf index 3ec56084f9c29..9fd444a59efff 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.bs.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.bs.xlf @@ -439,8 +439,8 @@ Ova vrijednost nije valjana MAC adresa. - This URL does not contain a TLD. - Ovaj URL ne sadrži domenu najvišeg nivoa (TLD). + This URL is missing a top-level domain. + Ovom URL-u nedostaje domena najvišeg nivoa. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf index f10451c7b2c6a..c9da5988af148 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf @@ -439,8 +439,8 @@ Aquest valor no és una adreça MAC vàlida. - This URL does not contain a TLD. - Aquesta URL no conté un domini de nivell superior (TLD). + This URL is missing a top-level domain. + Aquesta URL no conté un domini de nivell superior. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf index 4904e2c4397d7..2c4c54d9f60af 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf @@ -439,8 +439,8 @@ Tato hodnota není platnou MAC adresou. - This URL does not contain a TLD. - Tato URL neobsahuje doménu nejvyššího řádu (TLD). + This URL is missing a top-level domain. + Této URL chybí doména nejvyššího řádu. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf index 748fc791d0ef6..a1ebdf7f81e24 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf @@ -439,8 +439,8 @@ Nid yw'r gwerth hwn yn gyfeiriad MAC dilys. - This URL does not contain a TLD. - Nid yw'r URL hwn yn cynnwys parth lefel uchaf (TLD). + This URL is missing a top-level domain. + Mae'r URL hwn yn colli parth lefel uchaf. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.da.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.da.xlf index 505edad652b66..808d8c6ad66d9 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.da.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.da.xlf @@ -439,8 +439,8 @@ Denne værdi er ikke en gyldig MAC-adresse. - This URL does not contain a TLD. - Denne URL indeholder ikke et topdomæne (TLD). + This URL is missing a top-level domain. + Denne URL mangler et topdomæne. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf index d15fb9c3da8ed..57a82c22b3775 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf @@ -439,8 +439,8 @@ Dieser Wert ist keine gültige MAC-Adresse. - This URL does not contain a TLD. - Diese URL enthält keine TLD. + This URL is missing a top-level domain. + Dieser URL fehlt eine Top-Level-Domain. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf index 8bca902b799d2..a60471835745b 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf @@ -439,8 +439,8 @@ Αυτός ο αριθμός δεν είναι έγκυρη διεύθυνση MAC. - This URL does not contain a TLD. - Αυτή η διεύθυνση URL δεν περιέχει έναν τομέα ανώτατου επιπέδου (TLD). + This URL is missing a top-level domain. + Αυτή η διεύθυνση URL λείπει ένας τομέας ανώτατου επιπέδου. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf index 94ff94a1ee6d9..721139011caec 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf @@ -439,8 +439,8 @@ This value is not a valid MAC address. - This URL does not contain a TLD. - This URL does not contain a TLD. + This URL is missing a top-level domain. + This URL is missing a top-level domain. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf index 52974ea52aa16..141ec515f7893 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf @@ -439,8 +439,8 @@ Este valor no es una dirección MAC válida. - This URL does not contain a TLD. - Esta URL no contiene un dominio de nivel superior (TLD). + This URL is missing a top-level domain. + Esta URL no contiene una extensión de dominio (TLD). diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf index bbacbb61391a2..d9d641322976b 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf @@ -439,8 +439,8 @@ See väärtus ei ole kehtiv MAC-aadress. - This URL does not contain a TLD. - Sellel URL-il puudub ülataseme domeen (TLD). + This URL is missing a top-level domain. + Sellel URL-il puudub ülataseme domeen. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf index 518539f929f36..bdcbaa393e6a1 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf @@ -439,8 +439,8 @@ Balio hau ez da MAC helbide baliozko bat. - This URL does not contain a TLD. - URL honek ez du goi-mailako domeinurik (TLD) du. + This URL is missing a top-level domain. + URL honek ez du goi-mailako domeinurik. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf index 8f91f142d062e..0f2cf5bbf1fed 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf @@ -439,8 +439,8 @@ این مقدار یک آدرس MAC معتبر نیست. - This URL does not contain a TLD. - این URL شامل دامنه سطح بالا (TLD) نمی‌شود. + This URL is missing a top-level domain. + این URL فاقد دامنه سطح بالا است. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf index 38a53d511311f..e9ca6c83347a6 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf @@ -439,8 +439,8 @@ Tämä arvo ei ole kelvollinen MAC-osoite. - This URL does not contain a TLD. - Tämä URL-osoite ei sisällä ylätason verkkotunnusta (TLD). + This URL is missing a top-level domain. + Tästä URL-osoitteesta puuttuu ylätason verkkotunnus. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf index 6194801874e7e..27a57d0331fe6 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf @@ -439,8 +439,8 @@ Cette valeur n'est pas une adresse MAC valide. - This URL does not contain a TLD. - Cette URL ne contient pas de domaine de premier niveau (TLD). + This URL is missing a top-level domain. + Cette URL est dépourvue de domaine de premier niveau. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf index f097bd30858c8..2a1199bed5c71 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf @@ -439,8 +439,8 @@ Este valor non é un enderezo MAC válido. - This URL does not contain a TLD. - Esta URL non contén un dominio de nivel superior (TLD). + This URL is missing a top-level domain. + Esta URL non contén un dominio de nivel superior. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.he.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.he.xlf index 2f506d39105cc..cd406b4eb86c8 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.he.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.he.xlf @@ -439,8 +439,8 @@ ערך זה אינו כתובת MAC תקפה. - This URL does not contain a TLD. - כתובת URL זו אינה מכילה דומיין רמה עליונה (TLD). + This URL is missing a top-level domain. + לכתובת URL זו חסר דומיין רמה עליונה. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf index 43cb98ce55c6f..d126c32137189 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf @@ -439,8 +439,8 @@ Ova vrijednost nije valjana MAC adresa. - This URL does not contain a TLD. - Ovaj URL ne sadrži najvišu razinu domene (TLD). + This URL is missing a top-level domain. + Ovom URL-u nedostaje najviša razina domene. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf index 308594d9fb405..d7deb83d04341 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf @@ -439,8 +439,8 @@ Ez az érték nem érvényes MAC-cím. - This URL does not contain a TLD. - Ez az URL nem tartalmaz felső szintű domain-t (TLD). + This URL is missing a top-level domain. + Ennek az URL-nek hiányzik a legfelső szintű domain. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.hy.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.hy.xlf index 0dc7b52f8a802..d8ff322e6ed76 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.hy.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.hy.xlf @@ -439,8 +439,8 @@ Այս արժեքը վավեր MAC հասցե չէ։ - This URL does not contain a TLD. - Այս URL-ը չունի վերին մակարդակի դոմեյն (TLD). + This URL is missing a top-level domain. + Այս URL-ը չունի վերին մակարդակի դոմեյն: diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf index c6161aa4147e8..109cb6891c92e 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf @@ -439,8 +439,8 @@ Nilai ini bukan alamat MAC yang valid. - This URL does not contain a TLD. - URL ini tidak mengandung domain tingkat atas (TLD). + This URL is missing a top-level domain. + URL ini kehilangan domain tingkat atas. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf index 4b5ca7a7064a0..df67a2c082b5c 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf @@ -439,8 +439,8 @@ Questo valore non è un indirizzo MAC valido. - This URL does not contain a TLD. - Questo URL non contiene un dominio di primo livello (TLD). + This URL is missing a top-level domain. + Questo URL è privo di un dominio di primo livello. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf index 25009e129f081..c977df4a3e186 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf @@ -439,8 +439,8 @@ この値は有効なMACアドレスではありません。 - This URL does not contain a TLD. - このURLにはトップレベルドメイン(TLD)が含まれていません。 + This URL is missing a top-level domain. + このURLはトップレベルドメインがありません。 diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf index 20f5dc679e285..28d1eff019aac 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf @@ -439,8 +439,8 @@ Dëse Wäert ass keng gülteg MAC-Adress. - This URL does not contain a TLD. - Dësen URL enthält keng Top-Level-Domain (TLD). + This URL is missing a top-level domain. + Dësen URL feelt eng Top-Level-Domain. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf index 61ba74fb63c5e..26b3a4e77e374 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf @@ -439,8 +439,8 @@ Ši vertė nėra galiojantis MAC adresas. - This URL does not contain a TLD. - Šis URL neturi aukščiausio lygio domeno (TLD). + This URL is missing a top-level domain. + Šiam URL trūksta aukščiausio lygio domeno. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf index 5ff2c412215b2..9bbaafd0ce334 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf @@ -439,8 +439,8 @@ Šī vērtība nav derīga MAC adrese. - This URL does not contain a TLD. - Šis URL nesatur augšējā līmeņa domēnu (TLD). + This URL is missing a top-level domain. + Šim URL trūkst augšējā līmeņa domēna. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.mk.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.mk.xlf index 31f164eee64c7..d941f59ea8c8c 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.mk.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.mk.xlf @@ -439,8 +439,8 @@ Оваа вредност не е валидна MAC адреса. - This URL does not contain a TLD. - Овој URL не содржи домен од највисоко ниво (TLD). + This URL is missing a top-level domain. + На овој URL недостасува домен од највисоко ниво. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.mn.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.mn.xlf index e284b5db7e214..4f997a7031592 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.mn.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.mn.xlf @@ -439,8 +439,8 @@ Энэ утга хүчинтэй MAC хаяг биш юм. - This URL does not contain a TLD. - Энэ URL нь дээд түвшингийн домейн (TLD)-гүй байна. + This URL is missing a top-level domain. + Энэ URL дээд түвшингийн домейн дутуу байна. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.my.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.my.xlf index 58f1ff48d1f1b..57b6e276dc9c5 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.my.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.my.xlf @@ -439,8 +439,8 @@ ဤတန်ဖိုးသည် မှန်ကန်သော MAC လိပ်စာ မဟုတ်ပါ။ - This URL does not contain a TLD. - ဤ URL သည် အမြင့်ဆုံးအဆင့်ဒိုမိန်း (TLD) မပါရှိပါ။ + This URL is missing a top-level domain. + ဤ URL တွင် အမြင့်ဆုံးအဆင့်ဒိုမိန်း ပါဝင်မရှိပါ။ diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.nb.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.nb.xlf index 0b4c3becb15e6..27a4d3c55a1ef 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.nb.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.nb.xlf @@ -439,8 +439,8 @@ Denne verdien er ikke en gyldig MAC-adresse. - This URL does not contain a TLD. - Denne URL-en inneholder ikke et toppnivådomene (TLD). + This URL is missing a top-level domain. + Denne URL-en mangler et toppnivådomene. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf index 5921aff720da2..7596799d0d904 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf @@ -439,8 +439,8 @@ Deze waarde is geen geldig MAC-adres. - This URL does not contain a TLD. - Deze URL bevat geen topleveldomein (TLD). + This URL is missing a top-level domain. + Deze URL mist een top-level domein. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.nn.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.nn.xlf index 9f2e950fda9af..de400b7d5115c 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.nn.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.nn.xlf @@ -439,8 +439,8 @@ Denne verdien er ikkje ein gyldig MAC-adresse. - This URL does not contain a TLD. - Denne URL-en inneheld ikkje eit toppnivådomene (TLD). + This URL is missing a top-level domain. + Denne URL-en manglar eit toppnivådomene. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf index 0b4c3becb15e6..27a4d3c55a1ef 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf @@ -439,8 +439,8 @@ Denne verdien er ikke en gyldig MAC-adresse. - This URL does not contain a TLD. - Denne URL-en inneholder ikke et toppnivådomene (TLD). + This URL is missing a top-level domain. + Denne URL-en mangler et toppnivådomene. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf index f3f43d4393e4b..18db2a41eacfd 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf @@ -439,8 +439,8 @@ Ta wartość nie jest prawidłowym adresem MAC. - This URL does not contain a TLD. - Podany adres URL nie zawiera domeny najwyższego poziomu (TLD). + This URL is missing a top-level domain. + Ten URL nie ma domeny najwyższego poziomu. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf index ffd79f80aca69..ed28ee31ea639 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf @@ -439,8 +439,8 @@ Este valor não é um endereço MAC válido. - This URL does not contain a TLD. - Esta URL não contém um domínio de topo (TLD). + This URL is missing a top-level domain. + Esta URL está faltando um domínio de topo. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf index d0b10db08b525..e5fe095eace75 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf @@ -439,8 +439,8 @@ Este valor não é um endereço MAC válido. - This URL does not contain a TLD. - Esta URL não contém um domínio de topo (TLD). + This URL is missing a top-level domain. + Esta URL está faltando um domínio de topo. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf index 0a785c6534786..3d0b819a95441 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf @@ -439,8 +439,8 @@ Această valoare nu este o adresă MAC validă. - This URL does not contain a TLD. - Acest URL nu conține un domeniu de nivel superior (TLD). + This URL is missing a top-level domain. + Acest URL îi lipsește un domeniu de nivel superior. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf index d6628053e575e..241cba52e3d61 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf @@ -439,8 +439,8 @@ Это значение не является действительным MAC-адресом. - This URL does not contain a TLD. - Этот URL не содержит домен верхнего уровня (TLD). + This URL is missing a top-level domain. + Этому URL не хватает домена верхнего уровня. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf index bb9602ff5335f..8886395e6e8c7 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf @@ -439,8 +439,8 @@ Táto hodnota nie je platnou MAC adresou. - This URL does not contain a TLD. - Táto URL neobsahuje doménu najvyššej úrovne (TLD). + This URL is missing a top-level domain. + Tomuto URL chýba doména najvyššej úrovne. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.sl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.sl.xlf index d5a4e01c30443..03e750b8af75b 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sl.xlf @@ -439,8 +439,8 @@ Ta vrednost ni veljaven MAC naslov. - This URL does not contain a TLD. - Ta URL ne vsebuje domene najvišje ravni (TLD). + This URL is missing a top-level domain. + Temu URL manjka domena najvišje ravni. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf index 822260dbd3528..e9b31b88258d9 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf @@ -448,8 +448,8 @@ Kjo nuk është një adresë e vlefshme e Kontrollit të Qasjes në Media (MAC). - This URL does not contain a TLD. - Ky URL nuk përmban një domain nivelin më të lartë (TLD). + This URL is missing a top-level domain. + Kësaj URL i mungon një domain i nivelit të lartë. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf index 0b588a47dd82c..0550626d03f4d 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf @@ -439,8 +439,8 @@ Ова вредност није валидна MAC адреса. - This URL does not contain a TLD. - Овај URL не садржи домен највишег нивоа (TLD). + This URL is missing a top-level domain. + Овом URL недостаје домен највишег нивоа. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf index 8d36355d82922..5a85bd764d3cc 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf @@ -439,8 +439,8 @@ Ova vrednost nije validna MAC adresa. - This URL does not contain a TLD. - Ovaj URL ne sadrži domen najvišeg nivoa (TLD). + This URL is missing a top-level domain. + Ovom URL nedostaje domen najvišeg nivoa. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf index bb20273d3fcb0..d7be868c10e96 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf @@ -439,8 +439,8 @@ Värdet är inte en giltig MAC-adress. - This URL does not contain a TLD. - Denna URL innehåller inte ett toppdomän (TLD). + This URL is missing a top-level domain. + Denna URL saknar en toppdomän. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.th.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.th.xlf index d3562dc28f889..0d811ed040f88 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.th.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.th.xlf @@ -439,8 +439,8 @@ ค่านี้ไม่ใช่ที่อยู่ MAC ที่ถูกต้อง - This URL does not contain a TLD. - URL นี้ไม่มีโดเมนระดับสูงสุด (TLD) อยู่. + This URL is missing a top-level domain. + URL นี้ขาดโดเมนระดับสูงสุด. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.tl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.tl.xlf index 9fcc43451a2e5..8e8146a0faade 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.tl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.tl.xlf @@ -439,8 +439,8 @@ Ang halagang ito ay hindi isang wastong MAC address. - This URL does not contain a TLD. - Ang URL na ito ay walang top-level domain (TLD). + This URL is missing a top-level domain. + Kulang ang URL na ito sa top-level domain. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf index 69ff5b41fe1fa..3553af7b74ddd 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf @@ -439,8 +439,8 @@ Bu değer geçerli bir MAC adresi değil. - This URL does not contain a TLD. - Bu URL bir üst düzey alan adı (TLD) içermiyor. + This URL is missing a top-level domain. + Bu URL bir üst düzey alan adı eksik. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf index 923c03ed0081d..8e93ea505e31d 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf @@ -439,8 +439,8 @@ Це значення не є дійсною MAC-адресою. - This URL does not contain a TLD. - Цей URL не містить домен верхнього рівня (TLD). + This URL is missing a top-level domain. + Цьому URL бракує домену верхнього рівня. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ur.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ur.xlf index 63bbaf3c40146..f994cb57a84e2 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ur.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ur.xlf @@ -439,8 +439,8 @@ یہ قیمت کوئی درست MAC پتہ نہیں ہے۔ - This URL does not contain a TLD. - یہ URL اوپری سطح کے ڈومین (TLD) کو شامل نہیں کرتا۔ + This URL is missing a top-level domain. + اس URL میں ٹاپ لیول ڈومین موجود نہیں ہے۔ diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.uz.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.uz.xlf index 9884cfea2996c..1e43fb0fff8cf 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.uz.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.uz.xlf @@ -439,8 +439,8 @@ Bu qiymat haqiqiy MAC manzil emas. - This URL does not contain a TLD. - Bu URL yuqori darajali domen (TLD)ni o'z ichiga olmaydi. + This URL is missing a top-level domain. + Bu URL yuqori darajali domenni o'z ichiga olmaydi. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf index 01202c414dc8f..b3073cc7370a0 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf @@ -439,8 +439,8 @@ Giá trị này không phải là địa chỉ MAC hợp lệ. - This URL does not contain a TLD. - URL này không chứa tên miền cấp cao (TLD). + This URL is missing a top-level domain. + URL này thiếu miền cấp cao. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf index 6380d0a83faee..fabf86d3b0e13 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf @@ -439,8 +439,8 @@ 该值不是有效的MAC地址。 - This URL does not contain a TLD. - 此URL不包含顶级域名(TLD)。 + This URL is missing a top-level domain. + 此URL缺少顶级域名。 diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf index e4e32f7761545..feee108a1bd3d 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf @@ -439,8 +439,8 @@ 這不是一個有效的MAC地址。 - This URL does not contain a TLD. - 此URL不含頂級域名(TLD)。 + This URL is missing a top-level domain. + 此URL缺少頂級域名。 From 6c74abfd1992e619d29670f0733bfbb5070b53fb Mon Sep 17 00:00:00 2001 From: Eviljeks <22118652+Eviljeks@users.noreply.github.com> Date: Wed, 17 Apr 2024 10:56:15 +0300 Subject: [PATCH 58/95] review uk translations v2 --- .../Resources/translations/validators.uk.xlf | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf index 8e93ea505e31d..7b9918910b151 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf @@ -136,7 +136,7 @@ This value is not a valid IP address. - Це значення не є дійсною IP-адресою. + Це значення не є дійсною IP-адресою. This value is not a valid language. @@ -192,7 +192,7 @@ No temporary folder was configured in php.ini, or the configured folder does not exist. - У php.ini не було налаштовано тимчасової теки, або налаштована тека не існує. + У php.ini не було налаштовано тимчасової теки, або налаштована тека не існує. Cannot write temporary file to disk. @@ -224,7 +224,7 @@ This value is not a valid International Bank Account Number (IBAN). - Це значення не є дійсним Міжнародним банківським рахунком (IBAN). + Це значення не є дійсним міжнародним номером банківського рахунку (IBAN). This value is not a valid ISBN-10. @@ -312,7 +312,7 @@ This value is not a valid Business Identifier Code (BIC). - Це значення не є дійсним Кодом ідентифікації бізнесу (BIC). + Це значення не є дійсним банківським кодом (BIC). Error @@ -320,7 +320,7 @@ This value is not a valid UUID. - Це значення не є дійсним UUID. + Це значення не є дійсним UUID. This value should be a multiple of {{ compared_value }}. @@ -436,11 +436,11 @@ This value is not a valid MAC address. - Це значення не є дійсною MAC-адресою. + Це значення не є дійсною MAC-адресою. This URL is missing a top-level domain. - Цьому URL бракує домену верхнього рівня. + Цьому URL не вистачає домену верхнього рівня. From bcac30e5bc8fe897b05add02d9cb18f2ecd655ea Mon Sep 17 00:00:00 2001 From: Asis Pattisahusiwa <79239132+asispts@users.noreply.github.com> Date: Wed, 17 Apr 2024 15:08:16 +0700 Subject: [PATCH 59/95] Update translation --- .../Validator/Resources/translations/validators.id.xlf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf index 109cb6891c92e..980b1a676704b 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf @@ -440,7 +440,7 @@ This URL is missing a top-level domain. - URL ini kehilangan domain tingkat atas. + URL ini tidak memiliki domain tingkat atas. From 2e82e6ce1b8b9665f0eef4fdf9e8bfd7da70bd75 Mon Sep 17 00:00:00 2001 From: connor Date: Tue, 16 Apr 2024 17:55:36 +0200 Subject: [PATCH 60/95] review and fix hungarian validation message --- .../Validator/Resources/translations/validators.hu.xlf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf index d7deb83d04341..a31848c775fde 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf @@ -440,7 +440,7 @@ This URL is missing a top-level domain. - Ennek az URL-nek hiányzik a legfelső szintű domain. + Az URL-ből hiányzik a legfelső szintű tartomány (top-level domain). From 1a33bc1ed3383775c0d68923c7b73c0211f83a25 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Wed, 17 Apr 2024 09:54:12 +0200 Subject: [PATCH 61/95] Add hint which version of Symfony not longer require proxy manager bridge --- src/Symfony/Bridge/ProxyManager/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bridge/ProxyManager/README.md b/src/Symfony/Bridge/ProxyManager/README.md index 32c87089def5d..aed2b203f673c 100644 --- a/src/Symfony/Bridge/ProxyManager/README.md +++ b/src/Symfony/Bridge/ProxyManager/README.md @@ -5,7 +5,8 @@ The ProxyManager bridge provides integration for [ProxyManager][1] with various Symfony components. > [!WARNING] -> This bridge is no longer necessary and is thus discontinued; 6.4 is the last version. +> This bridge is no longer necessary and is thus discontinued; 6.4 is the last version. +> The first version of Symfony no longer requiring the ProxyManager bridge for lazy services is 6.2. Resources --------- From d9351cc15ecd105841a9d5cac9571317a55f42ef Mon Sep 17 00:00:00 2001 From: HypeMC Date: Sun, 14 Apr 2024 07:40:57 +0200 Subject: [PATCH 62/95] [Validator] Missing translations for Croatian (hr) --- .../Validator/Resources/translations/validators.hr.xlf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf index d126c32137189..a7542a9353293 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf @@ -440,7 +440,7 @@ This URL is missing a top-level domain. - Ovom URL-u nedostaje najviša razina domene. + Ovom URL-u nedostaje vršna domena. From d37b9e7ede6b4a8dce68538854594853f6ea71b1 Mon Sep 17 00:00:00 2001 From: Tomasz Kowalczyk Date: Wed, 17 Apr 2024 12:42:45 +0200 Subject: [PATCH 63/95] [Validator] reviewed Polish translation for unit 113 --- .../Validator/Resources/translations/validators.pl.xlf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf index 18db2a41eacfd..42b6e9571b349 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf @@ -440,7 +440,7 @@ This URL is missing a top-level domain. - Ten URL nie ma domeny najwyższego poziomu. + Podany URL nie zawiera domeny najwyższego poziomu. From f6b4c650d2d548bf966b06090637ebf183387afc Mon Sep 17 00:00:00 2001 From: Neil Peyssard Date: Wed, 17 Apr 2024 14:44:21 +0200 Subject: [PATCH 64/95] [Serializer] Revert #54488 to fix BC Break --- .../Mapping/Loader/AnnotationLoader.php | 2 +- .../Normalizer/ObjectNormalizer.php | 16 ++--- .../Fixtures/SamePropertyAsMethodDummy.php | 48 -------------- ...yAsMethodWithMethodSerializedNameDummy.php | 62 ------------------ ...sMethodWithPropertySerializedNameDummy.php | 65 ------------------- .../Tests/Normalizer/ObjectNormalizerTest.php | 50 -------------- 6 files changed, 5 insertions(+), 238 deletions(-) delete mode 100644 src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodDummy.php delete mode 100644 src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodWithMethodSerializedNameDummy.php delete mode 100644 src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodWithPropertySerializedNameDummy.php diff --git a/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php b/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php index 82bd3b792c822..0137575cd9445 100644 --- a/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php +++ b/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php @@ -106,7 +106,7 @@ public function loadClassMetadata(ClassMetadataInterface $classMetadata) $accessorOrMutator = preg_match('/^(get|is|has|set)(.+)$/i', $method->name, $matches); if ($accessorOrMutator) { - $attributeName = $reflectionClass->hasProperty($method->name) ? $method->name : lcfirst($matches[2]); + $attributeName = lcfirst($matches[2]); if (isset($attributesMetadata[$attributeName])) { $attributeMetadata = $attributesMetadata[$attributeName]; diff --git a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php index 434b53a87f1dc..a1ab11177482e 100644 --- a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php @@ -95,25 +95,17 @@ protected function extractAttributes(object $object, ?string $format = null, arr if (str_starts_with($name, 'get') || str_starts_with($name, 'has')) { // getters and hassers - $attributeName = $name; + $attributeName = substr($name, 3); if (!$reflClass->hasProperty($attributeName)) { - $attributeName = substr($attributeName, 3); - - if (!$reflClass->hasProperty($attributeName)) { - $attributeName = lcfirst($attributeName); - } + $attributeName = lcfirst($attributeName); } } elseif (str_starts_with($name, 'is')) { // issers - $attributeName = $name; + $attributeName = substr($name, 2); if (!$reflClass->hasProperty($attributeName)) { - $attributeName = substr($attributeName, 2); - - if (!$reflClass->hasProperty($attributeName)) { - $attributeName = lcfirst($attributeName); - } + $attributeName = lcfirst($attributeName); } } diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodDummy.php deleted file mode 100644 index 89c8fcb9c399c..0000000000000 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodDummy.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Serializer\Tests\Fixtures; - -class SamePropertyAsMethodDummy -{ - private $freeTrial; - private $hasSubscribe; - private $getReady; - private $isActive; - - public function __construct($freeTrial, $hasSubscribe, $getReady, $isActive) - { - $this->freeTrial = $freeTrial; - $this->hasSubscribe = $hasSubscribe; - $this->getReady = $getReady; - $this->isActive = $isActive; - } - - public function getFreeTrial() - { - return $this->freeTrial; - } - - public function hasSubscribe() - { - return $this->hasSubscribe; - } - - public function getReady() - { - return $this->getReady; - } - - public function isActive() - { - return $this->isActive; - } -} diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodWithMethodSerializedNameDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodWithMethodSerializedNameDummy.php deleted file mode 100644 index b4cf205fd57c8..0000000000000 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodWithMethodSerializedNameDummy.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Serializer\Tests\Fixtures; - -use Symfony\Component\Serializer\Annotation\SerializedName; - -class SamePropertyAsMethodWithMethodSerializedNameDummy -{ - private $freeTrial; - private $hasSubscribe; - private $getReady; - private $isActive; - - public function __construct($freeTrial, $hasSubscribe, $getReady, $isActive) - { - $this->freeTrial = $freeTrial; - $this->hasSubscribe = $hasSubscribe; - $this->getReady = $getReady; - $this->isActive = $isActive; - } - - /** - * @SerializedName("free_trial_method") - */ - public function getFreeTrial() - { - return $this->freeTrial; - } - - /** - * @SerializedName("has_subscribe_method") - */ - public function hasSubscribe() - { - return $this->hasSubscribe; - } - - /** - * @SerializedName("get_ready_method") - */ - public function getReady() - { - return $this->getReady; - } - - /** - * @SerializedName("is_active_method") - */ - public function isActive() - { - return $this->isActive; - } -} diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodWithPropertySerializedNameDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodWithPropertySerializedNameDummy.php deleted file mode 100644 index 04dc64a3c71c0..0000000000000 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodWithPropertySerializedNameDummy.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Serializer\Tests\Fixtures; - -use Symfony\Component\Serializer\Annotation\SerializedName; - -class SamePropertyAsMethodWithPropertySerializedNameDummy -{ - /** - * @SerializedName("free_trial_property") - */ - private $freeTrial; - - /** - * @SerializedName("has_subscribe_property") - */ - private $hasSubscribe; - - /** - * @SerializedName("get_ready_property") - */ - private $getReady; - - /** - * @SerializedName("is_active_property") - */ - private $isActive; - - public function __construct($freeTrial, $hasSubscribe, $getReady, $isActive) - { - $this->freeTrial = $freeTrial; - $this->hasSubscribe = $hasSubscribe; - $this->getReady = $getReady; - $this->isActive = $isActive; - } - - public function getFreeTrial() - { - return $this->freeTrial; - } - - public function hasSubscribe() - { - return $this->hasSubscribe; - } - - public function getReady() - { - return $this->getReady; - } - - public function isActive() - { - return $this->isActive; - } -} diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php index f3ac1ef841c62..830817b8b673b 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php @@ -41,9 +41,6 @@ use Symfony\Component\Serializer\Tests\Fixtures\Php74Dummy; use Symfony\Component\Serializer\Tests\Fixtures\Php74DummyPrivate; use Symfony\Component\Serializer\Tests\Fixtures\Php80Dummy; -use Symfony\Component\Serializer\Tests\Fixtures\SamePropertyAsMethodDummy; -use Symfony\Component\Serializer\Tests\Fixtures\SamePropertyAsMethodWithMethodSerializedNameDummy; -use Symfony\Component\Serializer\Tests\Fixtures\SamePropertyAsMethodWithPropertySerializedNameDummy; use Symfony\Component\Serializer\Tests\Fixtures\SiblingHolder; use Symfony\Component\Serializer\Tests\Normalizer\Features\AttributesTestTrait; use Symfony\Component\Serializer\Tests\Normalizer\Features\CacheableObjectAttributesTestTrait; @@ -874,53 +871,6 @@ public function testNormalizeStdClass() $this->assertSame(['baz' => 'baz'], $this->normalizer->normalize($o2)); } - public function testSamePropertyAsMethod() - { - $object = new SamePropertyAsMethodDummy('free_trial', 'has_subscribe', 'get_ready', 'is_active'); - $expected = [ - 'freeTrial' => 'free_trial', - 'hasSubscribe' => 'has_subscribe', - 'getReady' => 'get_ready', - 'isActive' => 'is_active', - ]; - - $this->assertSame($expected, $this->normalizer->normalize($object)); - } - - public function testSamePropertyAsMethodWithPropertySerializedName() - { - $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); - $this->normalizer = new ObjectNormalizer($classMetadataFactory, new MetadataAwareNameConverter($classMetadataFactory)); - $this->normalizer->setSerializer($this->serializer); - - $object = new SamePropertyAsMethodWithPropertySerializedNameDummy('free_trial', 'has_subscribe', 'get_ready', 'is_active'); - $expected = [ - 'free_trial_property' => 'free_trial', - 'has_subscribe_property' => 'has_subscribe', - 'get_ready_property' => 'get_ready', - 'is_active_property' => 'is_active', - ]; - - $this->assertSame($expected, $this->normalizer->normalize($object)); - } - - public function testSamePropertyAsMethodWithMethodSerializedName() - { - $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); - $this->normalizer = new ObjectNormalizer($classMetadataFactory, new MetadataAwareNameConverter($classMetadataFactory)); - $this->normalizer->setSerializer($this->serializer); - - $object = new SamePropertyAsMethodWithMethodSerializedNameDummy('free_trial', 'has_subscribe', 'get_ready', 'is_active'); - $expected = [ - 'free_trial_method' => 'free_trial', - 'has_subscribe_method' => 'has_subscribe', - 'get_ready_method' => 'get_ready', - 'is_active_method' => 'is_active', - ]; - - $this->assertSame($expected, $this->normalizer->normalize($object)); - } - public function testNormalizeWithIgnoreAnnotationAndPrivateProperties() { $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); From 8b3bf65577d62b0bdb4aac8f0a43095e4ff990e6 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 17 Apr 2024 15:57:06 +0200 Subject: [PATCH 65/95] [Messenger] Fix reading pending messages with Redis --- .../Component/Messenger/Bridge/Redis/Transport/Connection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php b/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php index f0c7188b3754e..a5e1c21707a78 100644 --- a/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php +++ b/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php @@ -304,7 +304,7 @@ private function claimOldPendingMessages() try { // This could soon be optimized with https://github.com/antirez/redis/issues/5212 or // https://github.com/antirez/redis/issues/6256 - $pendingMessages = $this->connection->xpending($this->stream, $this->group, '-', '+', 1); + $pendingMessages = $this->connection->xpending($this->stream, $this->group, '-', '+', 1) ?: []; } catch (\RedisException $e) { throw new TransportException($e->getMessage(), 0, $e); } From 9bfe07685f4a7df126a23ce76fc4c4551e768309 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 17 Apr 2024 16:02:56 +0200 Subject: [PATCH 66/95] [Cache] Fix test failure related to Redis6Proxy on appveyor --- .../Cache/Tests/Traits/RedisProxiesTest.php | 63 ++++--------------- .../Component/Cache/Traits/Redis5Proxy.php | 2 +- .../Component/Cache/Traits/Redis6Proxy.php | 11 +++- .../Cache/Traits/Redis6ProxyTrait.php | 51 --------------- .../Cache/Traits/RedisCluster5Proxy.php | 2 +- .../Cache/Traits/RedisCluster6Proxy.php | 6 +- .../Cache/Traits/RedisCluster6ProxyTrait.php | 41 ------------ 7 files changed, 28 insertions(+), 148 deletions(-) delete mode 100644 src/Symfony/Component/Cache/Traits/Redis6ProxyTrait.php delete mode 100644 src/Symfony/Component/Cache/Traits/RedisCluster6ProxyTrait.php diff --git a/src/Symfony/Component/Cache/Tests/Traits/RedisProxiesTest.php b/src/Symfony/Component/Cache/Tests/Traits/RedisProxiesTest.php index 0e3f2de0b5ec3..d12a2831fb484 100644 --- a/src/Symfony/Component/Cache/Tests/Traits/RedisProxiesTest.php +++ b/src/Symfony/Component/Cache/Tests/Traits/RedisProxiesTest.php @@ -19,15 +19,16 @@ class RedisProxiesTest extends TestCase { /** - * @requires extension redis < 6 + * @requires extension redis * * @testWith ["Redis"] * ["RedisCluster"] */ - public function testRedis5Proxy($class) + public function testRedisProxy($class) { - $proxy = file_get_contents(\dirname(__DIR__, 2)."/Traits/{$class}5Proxy.php"); - $proxy = substr($proxy, 0, 4 + strpos($proxy, '[];')); + $version = version_compare(phpversion('redis'), '6', '>') ? '6' : '5'; + $proxy = file_get_contents(\dirname(__DIR__, 2)."/Traits/{$class}{$version}Proxy.php"); + $expected = substr($proxy, 0, 4 + strpos($proxy, '[];')); $methods = []; foreach ((new \ReflectionClass($class))->getMethods() as $method) { @@ -44,9 +45,13 @@ public function testRedis5Proxy($class) } uksort($methods, 'strnatcmp'); - $proxy .= implode('', $methods)."}\n"; + $expected .= implode('', $methods)."}\n"; + + if (!str_contains($expected, '#[\SensitiveParameter] ')) { + $proxy = str_replace('#[\SensitiveParameter] ', '', $proxy); + } - $this->assertStringEqualsFile(\dirname(__DIR__, 2)."/Traits/{$class}5Proxy.php", $proxy); + $this->assertSame($expected, $proxy); } /** @@ -77,50 +82,4 @@ public function testRelayProxy() $this->assertStringEqualsFile(\dirname(__DIR__, 2).'/Traits/RelayProxy.php', $proxy); } - - /** - * @requires extension openssl - * - * @testWith ["Redis", "redis"] - * ["RedisCluster", "redis_cluster"] - */ - public function testRedis6Proxy($class, $stub) - { - if (version_compare(phpversion('redis'), '6.0.2', '>')) { - $stub = file_get_contents("https://raw.githubusercontent.com/phpredis/phpredis/develop/{$stub}.stub.php"); - } else { - $stub = file_get_contents("https://raw.githubusercontent.com/phpredis/phpredis/6.0.2/{$stub}.stub.php"); - } - - $stub = preg_replace('/^class /m', 'return; \0', $stub); - $stub = preg_replace('/^return; class ([a-zA-Z]++)/m', 'interface \1StubInterface', $stub, 1); - $stub = preg_replace('/^ public const .*/m', '', $stub); - eval(substr($stub, 5)); - - $this->assertEquals(self::dumpMethods(new \ReflectionClass($class.'StubInterface')), self::dumpMethods(new \ReflectionClass(sprintf('Symfony\Component\Cache\Traits\%s6Proxy', $class)))); - } - - private static function dumpMethods(\ReflectionClass $class): string - { - $methods = []; - - foreach ($class->getMethods() as $method) { - if ('reset' === $method->name || method_exists(LazyProxyTrait::class, $method->name)) { - continue; - } - - $return = $method->getReturnType() instanceof \ReflectionNamedType && 'void' === (string) $method->getReturnType() ? '' : 'return '; - $signature = ProxyHelper::exportSignature($method, false, $args); - $methods[] = "\n ".str_replace('timeout = 0.0', 'timeout = 0', $signature)."\n".<<lazyObjectState->realInstance ??= (\$this->lazyObjectState->initializer)())->{$method->name}({$args}); - } - - EOPHP; - } - - usort($methods, 'strnatcmp'); - - return implode("\n", $methods); - } } diff --git a/src/Symfony/Component/Cache/Traits/Redis5Proxy.php b/src/Symfony/Component/Cache/Traits/Redis5Proxy.php index 06130cc33b9cc..0b2794ee18b46 100644 --- a/src/Symfony/Component/Cache/Traits/Redis5Proxy.php +++ b/src/Symfony/Component/Cache/Traits/Redis5Proxy.php @@ -81,7 +81,7 @@ public function append($key, $value) return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->append(...\func_get_args()); } - public function auth($auth) + public function auth(#[\SensitiveParameter] $auth) { return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->auth(...\func_get_args()); } diff --git a/src/Symfony/Component/Cache/Traits/Redis6Proxy.php b/src/Symfony/Component/Cache/Traits/Redis6Proxy.php index e41c0d10cc030..0680404fc1eee 100644 --- a/src/Symfony/Component/Cache/Traits/Redis6Proxy.php +++ b/src/Symfony/Component/Cache/Traits/Redis6Proxy.php @@ -28,7 +28,6 @@ class Redis6Proxy extends \Redis implements ResetInterface, LazyObjectInterface use LazyProxyTrait { resetLazyObject as reset; } - use Redis6ProxyTrait; private const LAZY_OBJECT_PROPERTY_SCOPES = []; @@ -227,6 +226,11 @@ public function discard(): \Redis|bool return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->discard(...\func_get_args()); } + public function dump($key): \Redis|string + { + return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dump(...\func_get_args()); + } + public function echo($str): \Redis|false|string { return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->echo(...\func_get_args()); @@ -647,6 +651,11 @@ public function ltrim($key, $start, $end): \Redis|bool return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ltrim(...\func_get_args()); } + public function mget($keys): \Redis|array + { + return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mget(...\func_get_args()); + } + public function migrate($host, $port, $key, $dstdb, $timeout, $copy = false, $replace = false, #[\SensitiveParameter] $credentials = null): \Redis|bool { return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->migrate(...\func_get_args()); diff --git a/src/Symfony/Component/Cache/Traits/Redis6ProxyTrait.php b/src/Symfony/Component/Cache/Traits/Redis6ProxyTrait.php deleted file mode 100644 index d086d5b3e8a09..0000000000000 --- a/src/Symfony/Component/Cache/Traits/Redis6ProxyTrait.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -if (version_compare(phpversion('redis'), '6.0.2', '>')) { - /** - * @internal - */ - trait Redis6ProxyTrait - { - public function dump($key): \Redis|false|string - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dump(...\func_get_args()); - } - - public function mget($keys): \Redis|array|false - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mget(...\func_get_args()); - } - - public function waitaof($numlocal, $numreplicas, $timeout): \Redis|array|false - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->waitaof(...\func_get_args()); - } - } -} else { - /** - * @internal - */ - trait Redis6ProxyTrait - { - public function dump($key): \Redis|string - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dump(...\func_get_args()); - } - - public function mget($keys): \Redis|array - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mget(...\func_get_args()); - } - } -} diff --git a/src/Symfony/Component/Cache/Traits/RedisCluster5Proxy.php b/src/Symfony/Component/Cache/Traits/RedisCluster5Proxy.php index da23e0f881e1b..511c53dd718a3 100644 --- a/src/Symfony/Component/Cache/Traits/RedisCluster5Proxy.php +++ b/src/Symfony/Component/Cache/Traits/RedisCluster5Proxy.php @@ -31,7 +31,7 @@ class RedisCluster5Proxy extends \RedisCluster implements ResetInterface, LazyOb private const LAZY_OBJECT_PROPERTY_SCOPES = []; - public function __construct($name, $seeds = null, $timeout = null, $read_timeout = null, $persistent = null, $auth = null) + public function __construct($name, $seeds = null, $timeout = null, $read_timeout = null, $persistent = null, #[\SensitiveParameter] $auth = null) { return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->__construct(...\func_get_args()); } diff --git a/src/Symfony/Component/Cache/Traits/RedisCluster6Proxy.php b/src/Symfony/Component/Cache/Traits/RedisCluster6Proxy.php index 6e06b075f27d7..fafc4acf2df06 100644 --- a/src/Symfony/Component/Cache/Traits/RedisCluster6Proxy.php +++ b/src/Symfony/Component/Cache/Traits/RedisCluster6Proxy.php @@ -28,7 +28,6 @@ class RedisCluster6Proxy extends \RedisCluster implements ResetInterface, LazyOb use LazyProxyTrait { resetLazyObject as reset; } - use RedisCluster6ProxyTrait; private const LAZY_OBJECT_PROPERTY_SCOPES = []; @@ -657,6 +656,11 @@ public function pttl($key): \RedisCluster|false|int return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pttl(...\func_get_args()); } + public function publish($channel, $message): \RedisCluster|bool + { + return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->publish(...\func_get_args()); + } + public function pubsub($key_or_address, ...$values): mixed { return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pubsub(...\func_get_args()); diff --git a/src/Symfony/Component/Cache/Traits/RedisCluster6ProxyTrait.php b/src/Symfony/Component/Cache/Traits/RedisCluster6ProxyTrait.php deleted file mode 100644 index 389c6e1adf347..0000000000000 --- a/src/Symfony/Component/Cache/Traits/RedisCluster6ProxyTrait.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -if (version_compare(phpversion('redis'), '6.0.2', '>')) { - /** - * @internal - */ - trait RedisCluster6ProxyTrait - { - public function publish($channel, $message): \RedisCluster|bool|int - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->publish(...\func_get_args()); - } - - public function waitaof($key_or_address, $numlocal, $numreplicas, $timeout): \RedisCluster|array|false - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->waitaof(...\func_get_args()); - } - } -} else { - /** - * @internal - */ - trait RedisCluster6ProxyTrait - { - public function publish($channel, $message): \RedisCluster|bool - { - return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->publish(...\func_get_args()); - } - } -} From 805fa9e3584b53e95a8a3c76bf5a4bcf622a8d7c Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 18 Apr 2024 08:42:37 +0200 Subject: [PATCH 67/95] review German translation --- .../Validator/Resources/translations/validators.de.xlf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf index 57a82c22b3775..3b65306314922 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf @@ -440,7 +440,7 @@ This URL is missing a top-level domain. - Dieser URL fehlt eine Top-Level-Domain. + Dieser URL fehlt eine Top-Level-Domain. From d5c8b996913a9360489b495b122cb709e1dcf661 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 18 Apr 2024 09:55:03 +0200 Subject: [PATCH 68/95] Auto-close PRs on subtree-splits --- .gitattributes | 1 + .github/sync-packages.php | 75 +++++++++++++++++++ .github/workflows/integration-tests.yml | 2 +- .github/workflows/package-tests.yml | 7 ++ src/Symfony/Bridge/Doctrine/.gitattributes | 3 +- .../Doctrine/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Bridge/Monolog/.gitattributes | 3 +- .../Monolog/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Bridge/PhpUnit/.gitattributes | 3 +- .../PhpUnit/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Bridge/ProxyManager/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Bridge/Twig/.gitattributes | 3 +- .../Twig/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Bundle/DebugBundle/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Bundle/FrameworkBundle/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Bundle/SecurityBundle/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Bundle/TwigBundle/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Bundle/WebProfilerBundle/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Component/Asset/.gitattributes | 3 +- .../Asset/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/BrowserKit/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Component/Cache/.gitattributes | 3 +- .../Cache/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Component/Config/.gitattributes | 3 +- .../Config/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Component/Console/.gitattributes | 3 +- .../Console/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/CssSelector/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../DependencyInjection/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/DomCrawler/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Component/Dotenv/.gitattributes | 3 +- .../Dotenv/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/ErrorHandler/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/EventDispatcher/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../ExpressionLanguage/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/Filesystem/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Component/Finder/.gitattributes | 3 +- .../Finder/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Component/Form/.gitattributes | 3 +- .../Form/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/HttpClient/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/HttpFoundation/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/HttpKernel/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/Inflector/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Component/Intl/.gitattributes | 3 +- .../Intl/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Component/Ldap/.gitattributes | 3 +- .../Ldap/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Component/Lock/.gitattributes | 3 +- .../Lock/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Component/Mailer/.gitattributes | 3 +- .../Mailer/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Mailer/Bridge/Amazon/.gitattributes | 3 +- .../Amazon/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Mailer/Bridge/Google/.gitattributes | 3 +- .../Google/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Mailer/Bridge/Mailchimp/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Mailer/Bridge/Mailgun/.gitattributes | 3 +- .../Mailgun/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Mailer/Bridge/Mailjet/.gitattributes | 3 +- .../Mailjet/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Mailer/Bridge/OhMySmtp/.gitattributes | 3 +- .../OhMySmtp/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Mailer/Bridge/Postmark/.gitattributes | 3 +- .../Postmark/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Mailer/Bridge/Sendgrid/.gitattributes | 3 +- .../Sendgrid/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Mailer/Bridge/Sendinblue/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/Messenger/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Messenger/Bridge/AmazonSqs/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Messenger/Bridge/Amqp/.gitattributes | 3 +- .../Amqp/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Bridge/Beanstalkd/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Messenger/Bridge/Doctrine/.gitattributes | 3 +- .../Doctrine/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Messenger/Bridge/Redis/.gitattributes | 3 +- .../Redis/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Component/Mime/.gitattributes | 3 +- .../Mime/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Component/Notifier/.gitattributes | 3 +- .../Notifier/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/AllMySms/.gitattributes | 3 +- .../AllMySms/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/AmazonSns/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Clickatell/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Discord/.gitattributes | 3 +- .../Discord/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Esendex/.gitattributes | 3 +- .../Esendex/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Expo/.gitattributes | 3 +- .../Expo/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/FakeChat/.gitattributes | 3 +- .../FakeChat/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/FakeSms/.gitattributes | 3 +- .../FakeSms/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Firebase/.gitattributes | 3 +- .../Firebase/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/FreeMobile/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/GatewayApi/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Gitter/.gitattributes | 3 +- .../Gitter/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/GoogleChat/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Infobip/.gitattributes | 3 +- .../Infobip/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Iqsms/.gitattributes | 3 +- .../Iqsms/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/LightSms/.gitattributes | 3 +- .../LightSms/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/LinkedIn/.gitattributes | 3 +- .../LinkedIn/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Mailjet/.gitattributes | 3 +- .../Mailjet/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Mattermost/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Mercure/.gitattributes | 3 +- .../Mercure/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Bridge/MessageBird/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Bridge/MessageMedia/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Bridge/MicrosoftTeams/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Mobyt/.gitattributes | 3 +- .../Mobyt/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Nexmo/.gitattributes | 3 +- .../Nexmo/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Octopush/.gitattributes | 3 +- .../Octopush/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/OneSignal/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/OvhCloud/.gitattributes | 3 +- .../OvhCloud/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/RocketChat/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Sendinblue/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Sinch/.gitattributes | 3 +- .../Sinch/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Slack/.gitattributes | 3 +- .../Slack/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Sms77/.gitattributes | 3 +- .../Sms77/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/SmsBiuras/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Smsapi/.gitattributes | 3 +- .../Smsapi/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Smsc/.gitattributes | 3 +- .../Smsc/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/SpotHit/.gitattributes | 3 +- .../SpotHit/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Telegram/.gitattributes | 3 +- .../Telegram/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Telnyx/.gitattributes | 3 +- .../Telnyx/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/TurboSms/.gitattributes | 3 +- .../TurboSms/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Twilio/.gitattributes | 3 +- .../Twilio/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Vonage/.gitattributes | 3 +- .../Vonage/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Yunpian/.gitattributes | 3 +- .../Yunpian/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Notifier/Bridge/Zulip/.gitattributes | 3 +- .../Zulip/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/OptionsResolver/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/PasswordHasher/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Component/Process/.gitattributes | 3 +- .../Process/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/PropertyAccess/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/PropertyInfo/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/RateLimiter/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Component/Routing/.gitattributes | 3 +- .../Routing/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Component/Runtime/.gitattributes | 3 +- .../Runtime/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/Security/Core/.gitattributes | 3 +- .../Core/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/Security/Csrf/.gitattributes | 3 +- .../Csrf/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/Security/Guard/.gitattributes | 3 +- .../Guard/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/Security/Http/.gitattributes | 3 +- .../Http/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/Semaphore/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/Serializer/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/Stopwatch/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Component/String/.gitattributes | 3 +- .../String/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/Templating/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/Translation/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Translation/Bridge/Crowdin/.gitattributes | 3 +- .../Crowdin/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Translation/Bridge/Loco/.gitattributes | 3 +- .../Loco/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Bridge/Lokalise/.gitattributes | 3 +- .../Lokalise/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Component/Uid/.gitattributes | 3 +- .../Uid/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/Validator/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/VarDumper/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Component/VarExporter/.gitattributes | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Component/WebLink/.gitattributes | 3 +- .../WebLink/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Component/Workflow/.gitattributes | 3 +- .../Workflow/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Component/Yaml/.gitattributes | 3 +- .../Yaml/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Contracts/.gitattributes | 1 + .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Contracts/Cache/.gitattributes | 1 + .../Cache/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Contracts/Deprecation/.gitattributes | 1 + .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Contracts/EventDispatcher/.gitattributes | 1 + .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Contracts/HttpClient/.gitattributes | 1 + .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ src/Symfony/Contracts/Service/.gitattributes | 1 + .../Service/.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ .../Contracts/Translation/.gitattributes | 1 + .../.github/PULL_REQUEST_TEMPLATE.md | 8 ++ .../.github/workflows/check-subtree-split.yml | 37 +++++++++ 391 files changed, 6018 insertions(+), 245 deletions(-) create mode 100644 .github/sync-packages.php create mode 100644 src/Symfony/Bridge/Doctrine/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Bridge/Doctrine/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Bridge/Monolog/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Bridge/Monolog/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Bridge/PhpUnit/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Bridge/PhpUnit/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Bridge/ProxyManager/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Bridge/ProxyManager/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Bridge/Twig/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Bridge/Twig/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Bundle/DebugBundle/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Bundle/DebugBundle/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Bundle/FrameworkBundle/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Bundle/FrameworkBundle/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Bundle/SecurityBundle/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Bundle/SecurityBundle/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Bundle/TwigBundle/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Bundle/TwigBundle/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Bundle/WebProfilerBundle/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Bundle/WebProfilerBundle/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Asset/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Asset/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/BrowserKit/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/BrowserKit/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Cache/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Cache/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Config/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Config/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Console/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Console/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/CssSelector/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/CssSelector/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/DependencyInjection/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/DependencyInjection/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/DomCrawler/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/DomCrawler/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Dotenv/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Dotenv/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/ErrorHandler/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/ErrorHandler/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/EventDispatcher/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/EventDispatcher/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/ExpressionLanguage/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/ExpressionLanguage/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Filesystem/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Filesystem/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Finder/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Finder/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Form/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Form/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/HttpClient/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/HttpClient/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/HttpFoundation/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/HttpFoundation/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/HttpKernel/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/HttpKernel/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Inflector/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Inflector/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Intl/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Intl/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Ldap/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Ldap/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Lock/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Lock/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Mailer/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Mailer/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Mailer/Bridge/Amazon/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Mailer/Bridge/Amazon/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Mailer/Bridge/Google/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Mailer/Bridge/Google/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Mailer/Bridge/Mailchimp/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Mailer/Bridge/Mailchimp/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Mailer/Bridge/Mailgun/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Mailer/Bridge/Mailgun/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Mailer/Bridge/Mailjet/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Mailer/Bridge/Mailjet/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Mailer/Bridge/OhMySmtp/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Mailer/Bridge/OhMySmtp/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Mailer/Bridge/Postmark/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Mailer/Bridge/Postmark/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Mailer/Bridge/Sendgrid/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Mailer/Bridge/Sendgrid/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Mailer/Bridge/Sendinblue/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Mailer/Bridge/Sendinblue/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Messenger/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Messenger/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Messenger/Bridge/AmazonSqs/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Messenger/Bridge/AmazonSqs/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Messenger/Bridge/Amqp/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Messenger/Bridge/Amqp/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Messenger/Bridge/Beanstalkd/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Messenger/Bridge/Beanstalkd/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Messenger/Bridge/Doctrine/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Messenger/Bridge/Doctrine/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Messenger/Bridge/Redis/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Messenger/Bridge/Redis/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Mime/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Mime/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/AllMySms/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/AllMySms/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/AmazonSns/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/AmazonSns/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Clickatell/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Clickatell/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Discord/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Discord/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Esendex/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Esendex/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Expo/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Expo/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/FakeChat/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/FakeChat/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/FakeSms/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/FakeSms/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Firebase/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Firebase/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/FreeMobile/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/FreeMobile/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/GatewayApi/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/GatewayApi/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Gitter/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Gitter/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/GoogleChat/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/GoogleChat/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Infobip/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Infobip/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Iqsms/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Iqsms/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/LightSms/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/LightSms/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/LinkedIn/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/LinkedIn/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Mailjet/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Mailjet/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Mattermost/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Mattermost/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Mercure/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Mercure/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/MessageBird/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/MessageBird/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/MessageMedia/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/MessageMedia/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Mobyt/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Mobyt/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Nexmo/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Nexmo/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Octopush/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Octopush/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/OneSignal/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/OneSignal/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/OvhCloud/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/OvhCloud/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/RocketChat/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/RocketChat/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Sendinblue/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Sendinblue/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Sinch/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Sinch/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Slack/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Slack/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Sms77/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Sms77/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/SmsBiuras/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/SmsBiuras/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Smsapi/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Smsapi/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Smsc/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Smsc/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/SpotHit/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/SpotHit/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Telegram/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Telegram/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Telnyx/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Telnyx/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/TurboSms/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/TurboSms/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Twilio/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Twilio/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Vonage/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Vonage/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Yunpian/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Yunpian/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Notifier/Bridge/Zulip/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Notifier/Bridge/Zulip/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/OptionsResolver/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/OptionsResolver/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/PasswordHasher/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/PasswordHasher/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Process/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Process/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/PropertyAccess/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/PropertyAccess/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/PropertyInfo/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/PropertyInfo/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/RateLimiter/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/RateLimiter/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Routing/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Routing/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Runtime/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Runtime/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Security/Core/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Security/Core/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Security/Csrf/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Security/Csrf/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Security/Guard/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Security/Guard/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Security/Http/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Security/Http/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Semaphore/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Semaphore/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Serializer/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Serializer/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Stopwatch/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Stopwatch/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/String/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/String/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Templating/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Templating/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Translation/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Translation/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Translation/Bridge/Crowdin/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Translation/Bridge/Crowdin/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Translation/Bridge/Loco/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Translation/Bridge/Loco/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Translation/Bridge/Lokalise/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Translation/Bridge/Lokalise/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Uid/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Uid/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Validator/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Validator/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/VarDumper/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/VarDumper/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/VarExporter/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/VarExporter/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/WebLink/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/WebLink/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Workflow/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Workflow/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Component/Yaml/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Component/Yaml/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Contracts/.gitattributes create mode 100644 src/Symfony/Contracts/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Contracts/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Contracts/Cache/.gitattributes create mode 100644 src/Symfony/Contracts/Cache/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Contracts/Cache/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Contracts/Deprecation/.gitattributes create mode 100644 src/Symfony/Contracts/Deprecation/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Contracts/Deprecation/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Contracts/EventDispatcher/.gitattributes create mode 100644 src/Symfony/Contracts/EventDispatcher/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Contracts/EventDispatcher/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Contracts/HttpClient/.gitattributes create mode 100644 src/Symfony/Contracts/HttpClient/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Contracts/HttpClient/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Contracts/Service/.gitattributes create mode 100644 src/Symfony/Contracts/Service/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Contracts/Service/.github/workflows/check-subtree-split.yml create mode 100644 src/Symfony/Contracts/Translation/.gitattributes create mode 100644 src/Symfony/Contracts/Translation/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 src/Symfony/Contracts/Translation/.github/workflows/check-subtree-split.yml diff --git a/.gitattributes b/.gitattributes index d1570aff1cd79..cf8890eefbda8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,3 +6,4 @@ /src/Symfony/Component/Runtime export-ignore /src/Symfony/Component/Translation/Bridge export-ignore /src/Symfony/Component/Intl/Resources/data/*/* linguist-generated=true +/.git* export-ignore diff --git a/.github/sync-packages.php b/.github/sync-packages.php new file mode 100644 index 0000000000000..3d056466016e9 --- /dev/null +++ b/.github/sync-packages.php @@ -0,0 +1,75 @@ + Date: Thu, 18 Apr 2024 14:46:34 +0200 Subject: [PATCH 69/95] fix merge --- .../Nexmo/.github/PULL_REQUEST_TEMPLATE.md | 8 ---- .../.github/workflows/check-subtree-split.yml | 37 ------------------- 2 files changed, 45 deletions(-) delete mode 100644 src/Symfony/Component/Notifier/Bridge/Nexmo/.github/PULL_REQUEST_TEMPLATE.md delete mode 100644 src/Symfony/Component/Notifier/Bridge/Nexmo/.github/workflows/check-subtree-split.yml diff --git a/src/Symfony/Component/Notifier/Bridge/Nexmo/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Nexmo/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4689c4dad430e..0000000000000 --- a/src/Symfony/Component/Notifier/Bridge/Nexmo/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,8 +0,0 @@ -Please do not submit any Pull Requests here. They will be closed. ---- - -Please submit your PR here instead: -https://github.com/symfony/symfony - -This repository is what we call a "subtree split": a read-only subset of that main repository. -We're looking forward to your PR there! diff --git a/src/Symfony/Component/Notifier/Bridge/Nexmo/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Nexmo/.github/workflows/check-subtree-split.yml deleted file mode 100644 index 16be48bae3113..0000000000000 --- a/src/Symfony/Component/Notifier/Bridge/Nexmo/.github/workflows/check-subtree-split.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Check subtree split - -on: - pull_request_target: - -jobs: - close-pull-request: - runs-on: ubuntu-latest - - steps: - - name: Close pull request - uses: actions/github-script@v6 - with: - script: | - if (context.repo.owner === "symfony") { - github.rest.issues.createComment({ - owner: "symfony", - repo: context.repo.repo, - issue_number: context.issue.number, - body: ` - Thanks for your Pull Request! We love contributions. - - However, you should instead open your PR on the main repository: - https://github.com/symfony/symfony - - This repository is what we call a "subtree split": a read-only subset of that main repository. - We're looking forward to your PR there! - ` - }); - - github.rest.pulls.update({ - owner: "symfony", - repo: context.repo.repo, - pull_number: context.issue.number, - state: "closed" - }); - } From 3e4522f0e9e4d9eda4e717ed61b0ff95dc4876c3 Mon Sep 17 00:00:00 2001 From: Asis Pattisahusiwa <79239132+asispts@users.noreply.github.com> Date: Thu, 18 Apr 2024 21:42:00 +0700 Subject: [PATCH 70/95] Review translation --- .../Validator/Resources/translations/validators.id.xlf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf index 980b1a676704b..b894c69d855d6 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf @@ -192,7 +192,7 @@ No temporary folder was configured in php.ini, or the configured folder does not exist. - Tidak ada folder sementara yang dikonfigurasi di php.ini, atau folder yang dikonfigurasi tidak ada. + Tidak ada folder sementara yang dikonfigurasi di php.ini, atau folder yang dikonfigurasi tidak ada. Cannot write temporary file to disk. From 0843389bbde8ab41569ad8f98fe53ae3a8196193 Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Thu, 18 Apr 2024 19:31:08 +0200 Subject: [PATCH 71/95] Add test for AccessTokenHeaderRegex and adjust regex A new test was added to AccessTokenAuthenticatorTest to ensure that the regular expression in HeaderAccessTokenExtractor works correctly. The regular expression was tweaked to support a wider range of tokens, especially those ending with an equals sign. --- .../HeaderAccessTokenExtractor.php | 2 +- .../AccessTokenAuthenticatorTest.php | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Security/Http/AccessToken/HeaderAccessTokenExtractor.php b/src/Symfony/Component/Security/Http/AccessToken/HeaderAccessTokenExtractor.php index 487b87c24633d..0903d178babc3 100644 --- a/src/Symfony/Component/Security/Http/AccessToken/HeaderAccessTokenExtractor.php +++ b/src/Symfony/Component/Security/Http/AccessToken/HeaderAccessTokenExtractor.php @@ -29,7 +29,7 @@ public function __construct( private readonly string $tokenType = 'Bearer' ) { $this->regex = sprintf( - '/^%s([a-zA-Z0-9\-_\+~\/\.]+)$/', + '/^%s([a-zA-Z0-9\-_\+~\/\.]+=*)$/', '' === $this->tokenType ? '' : preg_quote($this->tokenType).'\s+' ); } diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessTokenAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessTokenAuthenticatorTest.php index 4f010000429dd..5ee4869b431ae 100644 --- a/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessTokenAuthenticatorTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessTokenAuthenticatorTest.php @@ -18,6 +18,7 @@ use Symfony\Component\Security\Core\User\InMemoryUserProvider; use Symfony\Component\Security\Http\AccessToken\AccessTokenExtractorInterface; use Symfony\Component\Security\Http\AccessToken\AccessTokenHandlerInterface; +use Symfony\Component\Security\Http\AccessToken\HeaderAccessTokenExtractor; use Symfony\Component\Security\Http\Authenticator\AccessTokenAuthenticator; use Symfony\Component\Security\Http\Authenticator\FallbackUserLoader; use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge; @@ -159,4 +160,31 @@ public function testAuthenticateWithFallbackUserLoader() $this->assertEquals('test', $passport->getUser()->getUserIdentifier()); } + + /** + * @dataProvider provideAccessTokenHeaderRegex + */ + public function testAccessTokenHeaderRegex(string $input, ?string $expectedToken) + { + // Given + $extractor = new HeaderAccessTokenExtractor(); + $request = Request::create('/test', 'GET', [], [], [], ['HTTP_AUTHORIZATION' => $input]); + + // When + $token = $extractor->extractAccessToken($request); + + // Then + $this->assertEquals($expectedToken, $token); + } + + public function provideAccessTokenHeaderRegex(): array + { + return [ + ['Bearer token', 'token'], + ['Bearer mF_9.B5f-4.1JqM', 'mF_9.B5f-4.1JqM'], + ['Bearer d3JvbmdfcmVnZXhwX2V4bWFwbGU=', 'd3JvbmdfcmVnZXhwX2V4bWFwbGU='], + ['Bearer Not Valid', null], + ['Bearer (NotOK123)', null], + ]; + } } From 2f5a77c9e508d71aff4c93f19c9ecc5a59a66584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C4=81vis=20Z=C4=81l=C4=ABtis?= Date: Fri, 19 Apr 2024 00:42:17 +0300 Subject: [PATCH 72/95] [Validator] review validators.lv.xlf --- .../Validator/Resources/translations/validators.lv.xlf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf index 9bbaafd0ce334..66e370fea944d 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf @@ -440,7 +440,7 @@ This URL is missing a top-level domain. - Šim URL trūkst augšējā līmeņa domēna. + Šim URL trūkst augšējā līmeņa domēna. From 6a1f08db12271d6f02a5fff7cae7fcb6e2ff2dd9 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 19 Apr 2024 12:27:36 +0200 Subject: [PATCH 73/95] explicitly cast boolean SSL stream options --- .../Bridge/Redis/Transport/Connection.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php b/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php index 317e13a5b8d37..46401a66d6ca0 100644 --- a/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php +++ b/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php @@ -88,6 +88,22 @@ public function __construct(array $options, \Redis|Relay|\RedisCluster|null $red throw new InvalidArgumentException('Cannot configure Redis Sentinel and Redis Cluster instance at the same time.'); } + $booleanStreamOptions = [ + 'allow_self_signed', + 'capture_peer_cert', + 'capture_peer_cert_chain', + 'disable_compression', + 'SNI_enabled', + 'verify_peer', + 'verify_peer_name', + ]; + + foreach ($options['ssl'] ?? [] as $streamOption => $value) { + if (\in_array($streamOption, $booleanStreamOptions, true) && \is_string($value)) { + $options['ssl'][$streamOption] = filter_var($value, \FILTER_VALIDATE_BOOL); + } + } + if ((\is_array($host) && null === $sentinelMaster) || $redis instanceof \RedisCluster) { $hosts = \is_string($host) ? [$host.':'.$port] : $host; // Always ensure we have an array $this->redis = static fn () => self::initializeRedisCluster($redis, $hosts, $auth, $options); From 6b3407dd9eb20b3600c4de127bce1cce90694e5f Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 19 Apr 2024 15:25:31 +0200 Subject: [PATCH 74/95] fix merge --- .../.github/PULL_REQUEST_TEMPLATE.md | 8 ---- .../.github/workflows/check-subtree-split.yml | 37 ------------------- 2 files changed, 45 deletions(-) delete mode 100644 src/Symfony/Component/Inflector/.github/PULL_REQUEST_TEMPLATE.md delete mode 100644 src/Symfony/Component/Inflector/.github/workflows/check-subtree-split.yml diff --git a/src/Symfony/Component/Inflector/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Inflector/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4689c4dad430e..0000000000000 --- a/src/Symfony/Component/Inflector/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,8 +0,0 @@ -Please do not submit any Pull Requests here. They will be closed. ---- - -Please submit your PR here instead: -https://github.com/symfony/symfony - -This repository is what we call a "subtree split": a read-only subset of that main repository. -We're looking forward to your PR there! diff --git a/src/Symfony/Component/Inflector/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Inflector/.github/workflows/check-subtree-split.yml deleted file mode 100644 index 16be48bae3113..0000000000000 --- a/src/Symfony/Component/Inflector/.github/workflows/check-subtree-split.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Check subtree split - -on: - pull_request_target: - -jobs: - close-pull-request: - runs-on: ubuntu-latest - - steps: - - name: Close pull request - uses: actions/github-script@v6 - with: - script: | - if (context.repo.owner === "symfony") { - github.rest.issues.createComment({ - owner: "symfony", - repo: context.repo.repo, - issue_number: context.issue.number, - body: ` - Thanks for your Pull Request! We love contributions. - - However, you should instead open your PR on the main repository: - https://github.com/symfony/symfony - - This repository is what we call a "subtree split": a read-only subset of that main repository. - We're looking forward to your PR there! - ` - }); - - github.rest.pulls.update({ - owner: "symfony", - repo: context.repo.repo, - pull_number: context.issue.number, - state: "closed" - }); - } From 0b1b275046fabb67def80d4df296578b88010348 Mon Sep 17 00:00:00 2001 From: Mathias Arlaud Date: Fri, 19 Apr 2024 17:22:54 +0200 Subject: [PATCH 75/95] [PropertyInfo] Fix PHPStan properties type in trait --- .../PropertyInfo/Extractor/PhpStanExtractor.php | 8 ++++++++ .../Tests/Extractor/PhpStanExtractorTest.php | 2 ++ .../AnotherNamespace/DummyInAnotherNamespace.php | 7 +++++++ .../AnotherNamespace/DummyTraitInAnotherNamespace.php | 11 +++++++++++ .../Tests/Fixtures/TraitUsage/DummyUsingTrait.php | 3 +++ 5 files changed, 31 insertions(+) create mode 100644 src/Symfony/Component/PropertyInfo/Tests/Fixtures/TraitUsage/AnotherNamespace/DummyInAnotherNamespace.php create mode 100644 src/Symfony/Component/PropertyInfo/Tests/Fixtures/TraitUsage/AnotherNamespace/DummyTraitInAnotherNamespace.php diff --git a/src/Symfony/Component/PropertyInfo/Extractor/PhpStanExtractor.php b/src/Symfony/Component/PropertyInfo/Extractor/PhpStanExtractor.php index 2f169690bff12..0596eb24fc20e 100644 --- a/src/Symfony/Component/PropertyInfo/Extractor/PhpStanExtractor.php +++ b/src/Symfony/Component/PropertyInfo/Extractor/PhpStanExtractor.php @@ -233,6 +233,14 @@ private function getDocBlockFromProperty(string $class, string $property): ?arra return null; } + $reflector = $reflectionProperty->getDeclaringClass(); + + foreach ($reflector->getTraits() as $trait) { + if ($trait->hasProperty($property)) { + return $this->getDocBlockFromProperty($trait->getName(), $property); + } + } + if (null === $rawDocNode = $reflectionProperty->getDocComment() ?: null) { return null; } diff --git a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php index d8fa9b9192c51..fd11fcbeb8c63 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php +++ b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php @@ -19,6 +19,7 @@ use Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy; use Symfony\Component\PropertyInfo\Tests\Fixtures\ParentDummy; use Symfony\Component\PropertyInfo\Tests\Fixtures\RootDummy\RootDummyItem; +use Symfony\Component\PropertyInfo\Tests\Fixtures\TraitUsage\AnotherNamespace\DummyInAnotherNamespace; use Symfony\Component\PropertyInfo\Tests\Fixtures\TraitUsage\DummyUsedInTrait; use Symfony\Component\PropertyInfo\Tests\Fixtures\TraitUsage\DummyUsingTrait; use Symfony\Component\PropertyInfo\Type; @@ -311,6 +312,7 @@ public static function propertiesDefinedByTraitsProvider(): array ['propertyInTraitPrimitiveType', new Type(Type::BUILTIN_TYPE_STRING)], ['propertyInTraitObjectSameNamespace', new Type(Type::BUILTIN_TYPE_OBJECT, false, DummyUsedInTrait::class)], ['propertyInTraitObjectDifferentNamespace', new Type(Type::BUILTIN_TYPE_OBJECT, false, Dummy::class)], + ['dummyInAnotherNamespace', new Type(Type::BUILTIN_TYPE_OBJECT, false, DummyInAnotherNamespace::class)], ]; } diff --git a/src/Symfony/Component/PropertyInfo/Tests/Fixtures/TraitUsage/AnotherNamespace/DummyInAnotherNamespace.php b/src/Symfony/Component/PropertyInfo/Tests/Fixtures/TraitUsage/AnotherNamespace/DummyInAnotherNamespace.php new file mode 100644 index 0000000000000..5ae6b60b59731 --- /dev/null +++ b/src/Symfony/Component/PropertyInfo/Tests/Fixtures/TraitUsage/AnotherNamespace/DummyInAnotherNamespace.php @@ -0,0 +1,7 @@ + Date: Sat, 20 Apr 2024 19:09:02 +0300 Subject: [PATCH 76/95] review: translation RU --- .../Validator/Resources/translations/validators.ru.xlf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf index 241cba52e3d61..dbee06a984b2c 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf @@ -440,7 +440,7 @@ This URL is missing a top-level domain. - Этому URL не хватает домена верхнего уровня. + В этом URL отсутствует домен верхнего уровня. From 3db9b7745c608ecbbd85bc6b66c1a6587289820c Mon Sep 17 00:00:00 2001 From: Linas Ramanauskas Date: Sat, 20 Apr 2024 21:12:13 +0300 Subject: [PATCH 77/95] #53771 Updated validator Lithuanian translations --- .../Resources/translations/validators.lt.xlf | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf index 26b3a4e77e374..e16daea93b80f 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf @@ -136,7 +136,7 @@ This value is not a valid IP address. - Ši vertė nėra galiojantis IP adresas. + Ši reikšmė nėra tinkamas IP adresas. This value is not a valid language. @@ -192,7 +192,7 @@ No temporary folder was configured in php.ini, or the configured folder does not exist. - php.ini nesukonfigūruotas laikinas aplankas, arba sukonfigūruotas aplankas neegzistuoja. + php.ini nesukonfigūruotas laikinas aplankas arba sukonfigūruotas aplankas neegzistuoja. Cannot write temporary file to disk. @@ -224,7 +224,7 @@ This value is not a valid International Bank Account Number (IBAN). - Ši vertė nėra galiojantis Tarptautinis Banko Sąskaitos Numeris (IBAN). + Ši reikšmė nėra tinkamas Tarptautinis Banko Sąskaitos Numeris (IBAN). This value is not a valid ISBN-10. @@ -312,7 +312,7 @@ This value is not a valid Business Identifier Code (BIC). - Ši vertė nėra galiojantis Verslo Identifikavimo Kodas (BIC). + Ši reikšmė nėra tinkamas Verslo Identifikavimo Kodas (BIC). Error @@ -320,7 +320,7 @@ This value is not a valid UUID. - Ši vertė nėra galiojantis UUID. + Ši reikšmė nėra tinkamas UUID. This value should be a multiple of {{ compared_value }}. @@ -432,15 +432,15 @@ The detected character encoding is invalid ({{ detected }}). Allowed encodings are {{ encodings }}. - Nustatyta simbolių koduotė yra netinkama ({{ detected }}). Leidžiamos koduotės yra {{ encodings }}. + Aptikta simbolių koduotė yra netinkama ({{ detected }}). Leidžiamos koduotės yra {{ encodings }}. This value is not a valid MAC address. - Ši vertė nėra galiojantis MAC adresas. + Ši reikšmė nėra tinkamas MAC adresas. This URL is missing a top-level domain. - Šiam URL trūksta aukščiausio lygio domeno. + Šiam URL trūksta aukščiausio lygio domeno. From 4c58f7128696ad1754e5dbf78642dd2f2333dac0 Mon Sep 17 00:00:00 2001 From: AbdelatifAitBara Date: Sat, 20 Apr 2024 21:26:36 +0200 Subject: [PATCH 78/95] Updated id=113 Arabic translation. --- .../Validator/Resources/translations/validators.ar.xlf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf index a96cce98048e4..08012ac233bdd 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf @@ -440,7 +440,7 @@ This URL is missing a top-level domain. - هذا الرابط يفتقر إلى نطاق أعلى مستوى. + هذا الرابط يفتقر إلى نطاق المستوى الأعلى. From 259a8ca41757137594bb7b4894be05a1fbb1aa3f Mon Sep 17 00:00:00 2001 From: ywisax Date: Tue, 23 Apr 2024 00:59:38 +0800 Subject: [PATCH 79/95] Update AbstractSchemaListener.php to adjust more database params DigitalOcean's mysql instance set the default config "sql_require_primary_key=true", it will cause `./bin/console doctrine:schema:update --dump-sql` throw an Exception: ``` In Connection.php line 33: [PDOException (HY000)] SQLSTATE[HY000]: General error: 3750 Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key' is set. Add a primary key to the table or unset this variable to avoi d this message. Note that tables without a primary key can cause performance problems in row-based replication, so please consult your DBA before changing this setting. Exception trace: at /root/symfony-app/vendor/doctrine/dbal/src/Driver/PDO/Connection.php:33 PDO->exec() at /root/symfony-app/vendor/doctrine/dbal/src/Driver/PDO/Connection.php:33 Doctrine\DBAL\Driver\PDO\Connection->exec() at /root/symfony-app/vendor/doctrine/dbal/src/Driver/Middleware/AbstractConnectionMiddleware.php:46 Doctrine\DBAL\Driver\Middleware\AbstractConnectionMiddleware->exec() at /root/symfony-app/vendor/doctrine/dbal/src/Logging/Connection.php:50 Doctrine\DBAL\Logging\Connection->exec() at /root/symfony-app/vendor/doctrine/dbal/src/Driver/Middleware/AbstractConnectionMiddleware.php:46 Doctrine\DBAL\Driver\Middleware\AbstractConnectionMiddleware->exec() at /root/symfony-app/vendor/symfony/doctrine-bridge/Middleware/Debug/DBAL3/Connection.php:73 Symfony\Bridge\Doctrine\Middleware\Debug\DBAL3\Connection->exec() at /root/symfony-app/vendor/doctrine/dbal/src/Driver/Middleware/AbstractConnectionMiddleware.php:46 Doctrine\DBAL\Driver\Middleware\AbstractConnectionMiddleware->exec() at /root/symfony-app/bundles/DoctrineEnhanceBundle/src/Middleware/LogConnection.php:64 DoctrineEnhanceBundle\Middleware\LogConnection->exec() at /root/symfony-app/vendor/doctrine/dbal/src/Connection.php:1206 Doctrine\DBAL\Connection->executeStatement() at /root/symfony-app/vendor/doctrine/dbal/src/Schema/AbstractSchemaManager.php:1617 Doctrine\DBAL\Schema\AbstractSchemaManager->_execSql() at /root/symfony-app/vendor/doctrine/dbal/src/Schema/AbstractSchemaManager.php:930 Doctrine\DBAL\Schema\AbstractSchemaManager->createTable() at /root/symfony-app/vendor/symfony/doctrine-bridge/SchemaListener/AbstractSchemaListener.php:34 Symfony\Bridge\Doctrine\SchemaListener\AbstractSchemaListener::Symfony\Bridge\Doctrine\SchemaListener\{closure}() at /root/symfony-app/src/Messenger/DoctrineConnection.php:338 App\Messenger\DoctrineConnection->configureSchema() at /root/symfony-app/vendor/symfony/doctrine-messenger/Transport/DoctrineTransport.php:89 Symfony\Component\Messenger\Bridge\Doctrine\Transport\DoctrineTransport->configureSchema() at /root/symfony-app/vendor/symfony/doctrine-bridge/SchemaListener/MessengerTransportDoctrineSchemaListener.php:43 Symfony\Bridge\Doctrine\SchemaListener\MessengerTransportDoctrineSchemaListener->postGenerateSchema() at /root/symfony-app/vendor/symfony/doctrine-bridge/ContainerAwareEventManager.php:63 Symfony\Bridge\Doctrine\ContainerAwareEventManager->dispatchEvent() at /root/symfony-app/vendor/doctrine/orm/src/Tools/SchemaTool.php:421 Doctrine\ORM\Tools\SchemaTool->getSchemaFromMetadata() at /root/symfony-app/vendor/doctrine/orm/src/Tools/SchemaTool.php:980 Doctrine\ORM\Tools\SchemaTool->getUpdateSchemaSql() at /root/symfony-app/vendor/doctrine/orm/src/Tools/Console/Command/SchemaTool/UpdateCommand.php:92 Doctrine\ORM\Tools\Console\Command\SchemaTool\UpdateCommand->executeSchemaCommand() at /root/symfony-app/vendor/doctrine/orm/src/Tools/Console/Command/SchemaTool/AbstractCommand.php:44 Doctrine\ORM\Tools\Console\Command\SchemaTool\AbstractCommand->doExecute() at /root/symfony-app/vendor/doctrine/orm/src/Tools/Console/CommandCompatibility.php:32 Doctrine\ORM\Tools\Console\Command\SchemaTool\AbstractCommand->execute() at /root/symfony-app/vendor/symfony/console/Command/Command.php:326 Symfony\Component\Console\Command\Command->run() at /root/symfony-app/vendor/symfony/console/Application.php:1096 Symfony\Component\Console\Application->doRunCommand() at /root/symfony-app/vendor/symfony/framework-bundle/Console/Application.php:126 Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /root/symfony-app/vendor/symfony/console/Application.php:324 Symfony\Component\Console\Application->doRun() at /root/symfony-app/vendor/symfony/framework-bundle/Console/Application.php:80 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /root/symfony-app/vendor/symfony/console/Application.php:175 Symfony\Component\Console\Application->run() at /root/symfony-app/vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php:49 Symfony\Component\Runtime\Runner\Symfony\ConsoleApplicationRunner->run() at /root/symfony-app/vendor/autoload_runtime.php:29 require_once() at /root/symfony-app/bin/console:14 ``` This commit will change the code style in `getIsSameDatabaseChecker()`, use doctrine SchemaManager to create/drop the temp table, make it work on most case database instances. --- .../SchemaListener/AbstractSchemaListener.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/SchemaListener/AbstractSchemaListener.php b/src/Symfony/Bridge/Doctrine/SchemaListener/AbstractSchemaListener.php index 04907ee9a78bd..7d286d782cc62 100644 --- a/src/Symfony/Bridge/Doctrine/SchemaListener/AbstractSchemaListener.php +++ b/src/Symfony/Bridge/Doctrine/SchemaListener/AbstractSchemaListener.php @@ -13,6 +13,8 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\Exception\TableNotFoundException; +use Doctrine\DBAL\Schema\Table; +use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Tools\Event\GenerateSchemaEventArgs; abstract class AbstractSchemaListener @@ -22,8 +24,16 @@ abstract public function postGenerateSchema(GenerateSchemaEventArgs $event): voi protected function getIsSameDatabaseChecker(Connection $connection): \Closure { return static function (\Closure $exec) use ($connection): bool { + $schemaManager = $connection->createSchemaManager(); + $checkTable = 'schema_subscriber_check_'.bin2hex(random_bytes(7)); - $connection->executeStatement(sprintf('CREATE TABLE %s (id INTEGER NOT NULL)', $checkTable)); + $table = new Table($checkTable); + $table->addColumn('id', Types::INTEGER) + ->setAutoincrement(true) + ->setNotnull(true); + $table->setPrimaryKey(['id']); + + $schemaManager->createTable($table); try { $exec(sprintf('DROP TABLE %s', $checkTable)); @@ -32,7 +42,7 @@ protected function getIsSameDatabaseChecker(Connection $connection): \Closure } try { - $connection->executeStatement(sprintf('DROP TABLE %s', $checkTable)); + $schemaManager->dropTable($checkTable); return false; } catch (TableNotFoundException) { From df59f75e3cd2b53a40c840e8426002cc2bbeae59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oriol=20Vi=C3=B1als?= Date: Mon, 22 Apr 2024 15:31:01 +0200 Subject: [PATCH 80/95] Update spanish and catalan translations --- .../Resources/translations/validators.ca.xlf | 46 +++++++++---------- .../Resources/translations/validators.es.xlf | 4 +- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf index c9da5988af148..652c0a48d693c 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf @@ -108,7 +108,7 @@ This value is not a valid URL. - Aquest valor no és una URL vàlida. + Aquest valor no és un URL vàlid. The two values should be equal. @@ -116,7 +116,7 @@ The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - L'arxiu és massa gran. El tamany màxim permés és {{ limit }} {{ suffix }}. + L'arxiu és massa gran. La mida màxima permesa és {{ limit }} {{ suffix }}. The file is too large. @@ -136,7 +136,7 @@ This value is not a valid IP address. - Aquest valor no és una adreça IP vàlida. + Aquest valor no és una adreça IP vàlida. This value is not a valid language. @@ -160,19 +160,19 @@ The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - L'amplària de la imatge és massa gran ({{ width }}px). L'amplària màxima permesa són {{ max_width }}px. + L'amplària de la imatge és massa gran ({{ width }}px). L'amplària màxima permesa és {{ max_width }}px. The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - L'amplària de la imatge és massa petita ({{ width }}px). L'amplària mínima requerida són {{ min_width }}px. + L'amplària de la imatge és massa petita ({{ width }}px). L'amplària mínima requerida és {{ min_width }}px. The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - L'altura de la imatge és massa gran ({{ height }}px). L'altura màxima permesa són {{ max_height }}px. + L'altura de la imatge és massa gran ({{ height }}px). L'altura màxima permesa és {{ max_height }}px. The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - L'altura de la imatge és massa petita ({{ height }}px). L'altura mínima requerida són {{ min_height }}px. + L'altura de la imatge és massa petita ({{ height }}px). L'altura mínima requerida és {{ min_height }}px. This value should be the user's current password. @@ -192,7 +192,7 @@ No temporary folder was configured in php.ini, or the configured folder does not exist. - No s'ha configurat cap carpeta temporal en php.ini, o la carpeta configurada no existeix. + No s'ha configurat cap carpeta temporal en php.ini, o la carpeta configurada no existeix. Cannot write temporary file to disk. @@ -200,7 +200,7 @@ A PHP extension caused the upload to fail. - Una extensió de PHP va fer que la pujada fallara. + Una extensió de PHP va fer que la pujada fallarà. This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. @@ -224,7 +224,7 @@ This value is not a valid International Bank Account Number (IBAN). - Aquest valor no és un Número de Compte Bancari Internacional (IBAN) vàlid. + Aquest valor no és un Número de Compte Bancari Internacional (IBAN) vàlid. This value is not a valid ISBN-10. @@ -276,31 +276,31 @@ This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Aquest valor no hauria de idèntic a {{ compared_value_type }} {{ compared_value }}. + Aquest valor no hauria de ser idèntic a {{ compared_value_type }} {{ compared_value }}. The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - La proporció de l'imatge és massa gran ({{ ratio }}). La màxima proporció permesa és {{ max_ratio }}. + La proporció de la imatge és massa gran ({{ ratio }}). La màxima proporció permesa és {{ max_ratio }}. The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - La proporció de l'imatge és massa petita ({{ ratio }}). La mínima proporció permesa és {{ max_ratio }}. + La proporció de la imatge és massa petita ({{ ratio }}). La mínima proporció permesa és {{ min_ratio }}. The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - L'imatge és quadrada({{ width }}x{{ height }}px). Les imatges quadrades no estan permeses. + La imatge és quadrada({{ width }}x{{ height }}px). Les imatges quadrades no estan permeses. The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - L'imatge està orientada horitzontalment ({{ width }}x{{ height }}px). Les imatges orientades horitzontalment no estan permeses. + La imatge està orientada horitzontalment ({{ width }}x{{ height }}px). Les imatges orientades horitzontalment no estan permeses. The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - L'imatge està orientada verticalment ({{ width }}x{{ height }}px). Les imatges orientades verticalment no estan permeses. + La imatge està orientada verticalment ({{ width }}x{{ height }}px). Les imatges orientades verticalment no estan permeses. An empty file is not allowed. - No està permès un fixter buit. + No està permès un fitxer buit. The host could not be resolved. @@ -312,7 +312,7 @@ This value is not a valid Business Identifier Code (BIC). - Aquest valor no és un Codi d'Identificador de Negocis (BIC) vàlid. + Aquest valor no és un Codi d'identificació bancari (BIC) vàlid. Error @@ -320,7 +320,7 @@ This value is not a valid UUID. - Aquest valor no és un UUID vàlid. + Aquest valor no és un UUID vàlid. This value should be a multiple of {{ compared_value }}. @@ -428,19 +428,19 @@ The extension of the file is invalid ({{ extension }}). Allowed extensions are {{ extensions }}. - L'extensió del fitxer no és vàlida ({{ extension }}). Les extensions permeses són {{ extensions }}. + L'extensió del fitxer no és vàlida ({{ extension }}). Les extensions permeses són {{ extensions }}. The detected character encoding is invalid ({{ detected }}). Allowed encodings are {{ encodings }}. - S'ha detectat que la codificació de caràcters no és vàlida ({{ detected }}). Les codificacions permeses són {{ encodings }}. + S'ha detectat que la codificació de caràcters no és vàlida ({{ detected }}). Les codificacions permeses són {{ encodings }}. This value is not a valid MAC address. - Aquest valor no és una adreça MAC vàlida. + Aquest valor no és una adreça MAC vàlida. This URL is missing a top-level domain. - Aquesta URL no conté un domini de nivell superior. + Aquesta URL no conté un domini de primer nivell. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf index 141ec515f7893..d58045471c70c 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf @@ -404,7 +404,7 @@ The filename is too long. It should have {{ filename_max_length }} character or less.|The filename is too long. It should have {{ filename_max_length }} characters or less. - El nombre del archivo es demasido largo. Debe tener {{ filename_max_length }} carácter o menos.|El nombre del archivo es demasido largo. Debe tener {{ filename_max_length }} caracteres o menos. + El nombre del archivo es demasiado largo. Debe tener {{ filename_max_length }} carácter o menos.|El nombre del archivo es demasiado largo. Debe tener {{ filename_max_length }} caracteres o menos. The password strength is too low. Please use a stronger password. @@ -440,7 +440,7 @@ This URL is missing a top-level domain. - Esta URL no contiene una extensión de dominio (TLD). + Esta URL no contiene una extensión de dominio (TLD). From 19f91b068af9f7c08e5f508e20cab079df51d7fd Mon Sep 17 00:00:00 2001 From: javaDeveloperKid Date: Wed, 17 Apr 2024 23:53:56 +0200 Subject: [PATCH 81/95] [Serializer] Add AbstractNormalizerContextBuilder::defaultConstructorArguments() --- .../AbstractNormalizerContextBuilder.php | 14 +++++++++++--- .../AbstractNormalizerContextBuilderTest.php | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Serializer/Context/Normalizer/AbstractNormalizerContextBuilder.php b/src/Symfony/Component/Serializer/Context/Normalizer/AbstractNormalizerContextBuilder.php index ecb328dd651f4..f365ac8df2d70 100644 --- a/src/Symfony/Component/Serializer/Context/Normalizer/AbstractNormalizerContextBuilder.php +++ b/src/Symfony/Component/Serializer/Context/Normalizer/AbstractNormalizerContextBuilder.php @@ -104,17 +104,25 @@ public function withAllowExtraAttributes(?bool $allowExtraAttributes): static } /** - * Configures an hashmap of classes containing hashmaps of constructor argument => default value. + * Configures a hashmap of classes containing hashmaps of constructor argument => default value. * * The names need to match the parameter names in the constructor arguments. * * Eg: [Foo::class => ['foo' => true, 'bar' => 0]] * - * @param array>|null $defaultContructorArguments + * @param array>|null $defaultConstructorArguments + */ + public function withDefaultConstructorArguments(?array $defaultConstructorArguments): static + { + return $this->with(AbstractNormalizer::DEFAULT_CONSTRUCTOR_ARGUMENTS, $defaultConstructorArguments); + } + + /** + * Deprecated in Symfony 7.1, use withDefaultConstructorArguments() instead. */ public function withDefaultContructorArguments(?array $defaultContructorArguments): static { - return $this->with(AbstractNormalizer::DEFAULT_CONSTRUCTOR_ARGUMENTS, $defaultContructorArguments); + return self::withDefaultConstructorArguments($defaultContructorArguments); } /** diff --git a/src/Symfony/Component/Serializer/Tests/Context/Normalizer/AbstractNormalizerContextBuilderTest.php b/src/Symfony/Component/Serializer/Tests/Context/Normalizer/AbstractNormalizerContextBuilderTest.php index 158fa8feacf7a..4b8f0cc3f7dc8 100644 --- a/src/Symfony/Component/Serializer/Tests/Context/Normalizer/AbstractNormalizerContextBuilderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Context/Normalizer/AbstractNormalizerContextBuilderTest.php @@ -41,7 +41,7 @@ public function testWithers(array $values) ->withGroups($values[AbstractNormalizer::GROUPS]) ->withAttributes($values[AbstractNormalizer::ATTRIBUTES]) ->withAllowExtraAttributes($values[AbstractNormalizer::ALLOW_EXTRA_ATTRIBUTES]) - ->withDefaultContructorArguments($values[AbstractNormalizer::DEFAULT_CONSTRUCTOR_ARGUMENTS]) + ->withDefaultConstructorArguments($values[AbstractNormalizer::DEFAULT_CONSTRUCTOR_ARGUMENTS]) ->withCallbacks($values[AbstractNormalizer::CALLBACKS]) ->withCircularReferenceHandler($values[AbstractNormalizer::CIRCULAR_REFERENCE_HANDLER]) ->withIgnoredAttributes($values[AbstractNormalizer::IGNORED_ATTRIBUTES]) From a2349920cd5d692afc83cec5d7b06f2e58c3b79a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Verlhac?= Date: Sat, 20 Apr 2024 13:06:54 +0200 Subject: [PATCH 82/95] review: FR translation Fix #54649 --- .../Validator/Resources/translations/validators.fr.xlf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf index 27a57d0331fe6..a60384c5d7724 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf @@ -440,7 +440,7 @@ This URL is missing a top-level domain. - Cette URL est dépourvue de domaine de premier niveau. + Cette URL doit contenir un de domaine de premier niveau. From af870c6b48d900188a54a726f65daad179a73ede Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 22 Apr 2024 09:29:52 +0200 Subject: [PATCH 83/95] [Finder] Also consider .git inside the basedir of in() directory Signed-off-by: Joas Schilling --- .../Iterator/VcsIgnoredFilterIterator.php | 6 +-- .../Iterator/VcsIgnoredFilterIteratorTest.php | 54 ++++++++++++++++++- 2 files changed, 55 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Component/Finder/Iterator/VcsIgnoredFilterIterator.php b/src/Symfony/Component/Finder/Iterator/VcsIgnoredFilterIterator.php index ddd7007728a7f..b278706e9f340 100644 --- a/src/Symfony/Component/Finder/Iterator/VcsIgnoredFilterIterator.php +++ b/src/Symfony/Component/Finder/Iterator/VcsIgnoredFilterIterator.php @@ -37,9 +37,9 @@ public function __construct(\Iterator $iterator, string $baseDir) { $this->baseDir = $this->normalizePath($baseDir); - foreach ($this->parentDirectoriesUpwards($this->baseDir) as $parentDirectory) { - if (@is_dir("{$parentDirectory}/.git")) { - $this->baseDir = $parentDirectory; + foreach ([$this->baseDir, ...$this->parentDirectoriesUpwards($this->baseDir)] as $directory) { + if (@is_dir("{$directory}/.git")) { + $this->baseDir = $directory; break; } } diff --git a/src/Symfony/Component/Finder/Tests/Iterator/VcsIgnoredFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/VcsIgnoredFilterIteratorTest.php index 3ebe481f559c5..f725374d815e7 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/VcsIgnoredFilterIteratorTest.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/VcsIgnoredFilterIteratorTest.php @@ -34,7 +34,7 @@ protected function tearDown(): void * * @dataProvider getAcceptData */ - public function testAccept(array $gitIgnoreFiles, array $otherFileNames, array $expectedResult) + public function testAccept(array $gitIgnoreFiles, array $otherFileNames, array $expectedResult, string $baseDir = '') { $otherFileNames = $this->toAbsolute($otherFileNames); foreach ($otherFileNames as $path) { @@ -51,7 +51,8 @@ public function testAccept(array $gitIgnoreFiles, array $otherFileNames, array $ $inner = new InnerNameIterator($otherFileNames); - $iterator = new VcsIgnoredFilterIterator($inner, $this->tmpDir); + $baseDir = $this->tmpDir.('' !== $baseDir ? '/'.$baseDir : ''); + $iterator = new VcsIgnoredFilterIterator($inner, $baseDir); $this->assertIterator($this->toAbsolute($expectedResult), $iterator); } @@ -74,6 +75,55 @@ public static function getAcceptData(): iterable ], ]; + yield 'simple file - .gitignore and in() from repository root' => [ + [ + '.gitignore' => 'a.txt', + ], + [ + '.git', + 'a.txt', + 'b.txt', + 'dir/', + 'dir/a.txt', + ], + [ + '.git', + 'b.txt', + 'dir', + ], + ]; + + yield 'nested git repositories only consider .gitignore files of the most inner repository' => [ + [ + '.gitignore' => "nested/*\na.txt", + 'nested/.gitignore' => 'c.txt', + 'nested/dir/.gitignore' => 'f.txt', + ], + [ + '.git', + 'a.txt', + 'b.txt', + 'nested/', + 'nested/.git', + 'nested/c.txt', + 'nested/d.txt', + 'nested/dir/', + 'nested/dir/e.txt', + 'nested/dir/f.txt', + ], + [ + '.git', + 'a.txt', + 'b.txt', + 'nested', + 'nested/.git', + 'nested/d.txt', + 'nested/dir', + 'nested/dir/e.txt', + ], + 'nested', + ]; + yield 'simple file at root' => [ [ '.gitignore' => '/a.txt', From f439702d4f82b6436377f93c3c5384d9b8a377f6 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 23 Apr 2024 13:55:11 +0200 Subject: [PATCH 84/95] call substr() with integer offsets --- src/Symfony/Component/Yaml/Parser.php | 4 ++-- src/Symfony/Component/Yaml/Tests/ParserTest.php | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Yaml/Parser.php b/src/Symfony/Component/Yaml/Parser.php index 1b193ee6e917f..6b5b273a77ead 100644 --- a/src/Symfony/Component/Yaml/Parser.php +++ b/src/Symfony/Component/Yaml/Parser.php @@ -653,12 +653,12 @@ private function getNextEmbedBlock(?int $indentation = null, bool $inSequence = } if ($this->isCurrentLineBlank()) { - $data[] = substr($this->currentLine, $newIndent); + $data[] = substr($this->currentLine, $newIndent ?? 0); continue; } if ($indent >= $newIndent) { - $data[] = substr($this->currentLine, $newIndent); + $data[] = substr($this->currentLine, $newIndent ?? 0); } elseif ($this->isCurrentLineComment()) { $data[] = $this->currentLine; } elseif (0 == $indent) { diff --git a/src/Symfony/Component/Yaml/Tests/ParserTest.php b/src/Symfony/Component/Yaml/Tests/ParserTest.php index 741a6ad83c99e..5fa6d08064334 100644 --- a/src/Symfony/Component/Yaml/Tests/ParserTest.php +++ b/src/Symfony/Component/Yaml/Tests/ParserTest.php @@ -1476,13 +1476,13 @@ public static function getBinaryData() data: !!binary | SGVsbG8gd29ybGQ= EOT - ], + ], 'containing spaces in block scalar' => [ <<<'EOT' data: !!binary | SGVs bG8gd 29ybGQ= EOT - ], + ], ]; } @@ -2949,6 +2949,11 @@ public function testParseIdeographicSpaces() ], $this->parser->parse($expected)); } + public function testSkipBlankLines() + { + $this->assertSame(['foo' => [null]], (new Parser())->parse("foo:\n-\n\n")); + } + private function assertSameData($expected, $actual) { $this->assertEquals($expected, $actual); From 0413610e55e519cdae8e6ca20e4207af48d46f23 Mon Sep 17 00:00:00 2001 From: Antoine Lamirault Date: Tue, 23 Apr 2024 21:37:17 +0200 Subject: [PATCH 85/95] Fix french translation --- .../Validator/Resources/translations/validators.fr.xlf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf index a60384c5d7724..4e949d838cae7 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf @@ -440,7 +440,7 @@ This URL is missing a top-level domain. - Cette URL doit contenir un de domaine de premier niveau. + Cette URL doit contenir un domaine de premier niveau. From 0fa87b58627264e84aaae2a8283132f7feded510 Mon Sep 17 00:00:00 2001 From: Simone Ruggieri <36771527+Simopich@users.noreply.github.com> Date: Wed, 24 Apr 2024 17:08:17 +0200 Subject: [PATCH 86/95] Reviewed italian translation --- .../Validator/Resources/translations/validators.it.xlf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf index df67a2c082b5c..74f3a75b0c97e 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf @@ -440,7 +440,7 @@ This URL is missing a top-level domain. - Questo URL è privo di un dominio di primo livello. + Questo URL è privo di un dominio di primo livello. From a3a2eb1f31a048361d387028affe082bf3dc39a9 Mon Sep 17 00:00:00 2001 From: ffd000 <66318502+ffd000@users.noreply.github.com> Date: Wed, 24 Apr 2024 12:08:44 +0300 Subject: [PATCH 87/95] [Validator] Review Bulgarian (bg) translation --- .../Resources/translations/validators.bg.xlf | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf index de24ec5eb0c4d..d2405339f0c35 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf @@ -68,7 +68,7 @@ The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Mime типа на файла е невалиден ({{ type }}). Разрешени mime типове са {{ types }}. + Mime типът на файла е невалиден ({{ type }}). Разрешени mime типове са {{ types }}. This value should be {{ limit }} or less. @@ -136,7 +136,7 @@ This value is not a valid IP address. - Тази стойност не е валиден IP адрес. + Стойността не е валиден IP адрес. This value is not a valid language. @@ -156,7 +156,7 @@ The size of the image could not be detected. - Размера на изображението не може да бъде определен. + Размерът на изображението не може да бъде определен. The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. @@ -192,7 +192,7 @@ No temporary folder was configured in php.ini, or the configured folder does not exist. - В php.ini не е конфигурирана временна директория, или конфигурираната директория не съществува. + В php.ini не е конфигурирана временна директория или конфигурираната директория не съществува. Cannot write temporary file to disk. @@ -224,7 +224,7 @@ This value is not a valid International Bank Account Number (IBAN). - Тази стойност не е валиден международен банков сметка номер (IBAN). + Стойността не е валиден Международен номер на банкова сметка (IBAN). This value is not a valid ISBN-10. @@ -312,7 +312,7 @@ This value is not a valid Business Identifier Code (BIC). - Тази стойност не е валиден код за идентификация на бизнеса (BIC). + Стойността не е валиден Бизнес идентификационен код (BIC). Error @@ -320,7 +320,7 @@ This value is not a valid UUID. - Тази стойност не е валиден UUID. + Стойността не е валиден UUID. This value should be a multiple of {{ compared_value }}. @@ -328,7 +328,7 @@ This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Бизнес идентификационния код (BIC) не е свързан с IBAN {{ iban }}. + Бизнес идентификационният код (BIC) не е свързан с IBAN {{ iban }}. This value should be valid JSON. @@ -360,7 +360,7 @@ This password has been leaked in a data breach, it must not be used. Please use another password. - Тази парола е компрометирана, не трябва да бъде използвана. Моля използвайте друга парола. + Тази парола е компрометирана, не може да бъде използвана. Моля използвайте друга парола. This value should be between {{ min }} and {{ max }}. @@ -436,11 +436,11 @@ This value is not a valid MAC address. - Тази стойност не е валиден MAC адрес. + Стойността не е валиден MAC адрес. This URL is missing a top-level domain. - На този URL липсва домейн от най-високо ниво. + На този URL липсва домейн от най-високо ниво. From e0d97f8629f0e2608fc876ca37d71d855526cea2 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 24 Apr 2024 19:39:38 +0200 Subject: [PATCH 88/95] read form values using the chain data accessor --- .../DataAccessor/PropertyPathAccessor.php | 25 ++++++++++++++++-- .../Extension/Core/DataMapper/DataMapper.php | 8 ++++++ .../Core/DataMapper/DataMapperTest.php | 26 +++++++++++++++++++ 3 files changed, 57 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Form/Extension/Core/DataAccessor/PropertyPathAccessor.php b/src/Symfony/Component/Form/Extension/Core/DataAccessor/PropertyPathAccessor.php index e639bad2a49c2..24de33a6b902e 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataAccessor/PropertyPathAccessor.php +++ b/src/Symfony/Component/Form/Extension/Core/DataAccessor/PropertyPathAccessor.php @@ -12,7 +12,9 @@ namespace Symfony\Component\Form\Extension\Core\DataAccessor; use Symfony\Component\Form\DataAccessorInterface; +use Symfony\Component\Form\DataMapperInterface; use Symfony\Component\Form\Exception\AccessException; +use Symfony\Component\Form\Extension\Core\DataMapper\DataMapper; use Symfony\Component\Form\FormInterface; use Symfony\Component\PropertyAccess\Exception\AccessException as PropertyAccessException; use Symfony\Component\PropertyAccess\Exception\NoSuchIndexException; @@ -57,15 +59,25 @@ public function setValue(&$data, $propertyValue, FormInterface $form): void throw new AccessException('Unable to write the given value as no property path is defined.'); } + $getValue = function () use ($data, $form, $propertyPath) { + $dataMapper = $this->getDataMapper($form); + + if ($dataMapper instanceof DataMapper && null !== $dataAccessor = $dataMapper->getDataAccessor()) { + return $dataAccessor->getValue($data, $form); + } + + return $this->getPropertyValue($data, $propertyPath); + }; + // If the field is of type DateTimeInterface and the data is the same skip the update to // keep the original object hash - if ($propertyValue instanceof \DateTimeInterface && $propertyValue == $this->getPropertyValue($data, $propertyPath)) { + if ($propertyValue instanceof \DateTimeInterface && $propertyValue == $getValue()) { return; } // If the data is identical to the value in $data, we are // dealing with a reference - if (!\is_object($data) || !$form->getConfig()->getByReference() || $propertyValue !== $this->getPropertyValue($data, $propertyPath)) { + if (!\is_object($data) || !$form->getConfig()->getByReference() || $propertyValue !== $getValue()) { $this->propertyAccessor->setValue($data, $propertyPath, $propertyValue); } } @@ -105,4 +117,13 @@ private function getPropertyValue($data, PropertyPathInterface $propertyPath) return null; } } + + private function getDataMapper(FormInterface $form): ?DataMapperInterface + { + do { + $dataMapper = $form->getConfig()->getDataMapper(); + } while (null === $dataMapper && null !== $form = $form->getParent()); + + return $dataMapper; + } } diff --git a/src/Symfony/Component/Form/Extension/Core/DataMapper/DataMapper.php b/src/Symfony/Component/Form/Extension/Core/DataMapper/DataMapper.php index 7995842eecbbf..e480f47baa632 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataMapper/DataMapper.php +++ b/src/Symfony/Component/Form/Extension/Core/DataMapper/DataMapper.php @@ -88,4 +88,12 @@ public function mapFormsToData(iterable $forms, &$data): void } } } + + /** + * @internal + */ + public function getDataAccessor(): DataAccessorInterface + { + return $this->dataAccessor; + } } diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/DataMapperTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/DataMapperTest.php index c119d665b85f1..c4a271cd03fb2 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/DataMapperTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/DataMapperTest.php @@ -17,6 +17,8 @@ use Symfony\Component\Form\Extension\Core\DataAccessor\PropertyPathAccessor; use Symfony\Component\Form\Extension\Core\DataMapper\DataMapper; use Symfony\Component\Form\Extension\Core\Type\DateType; +use Symfony\Component\Form\Extension\Core\Type\FormType; +use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\Form; use Symfony\Component\Form\FormConfigBuilder; use Symfony\Component\Form\FormFactoryBuilder; @@ -419,6 +421,25 @@ public function testMapFormsToDataMapsDateTimeInstanceToArrayIfNotSetBefore() $this->assertEquals(['date' => new \DateTime('2022-08-04', new \DateTimeZone('UTC'))], $form->getData()); } + + public function testMapFormToDataWithOnlyGetterConfigured() + { + $person = new DummyPerson('foo'); + $form = (new FormFactoryBuilder()) + ->getFormFactory() + ->createBuilder(FormType::class, $person) + ->add('name', TextType::class, [ + 'getter' => function (DummyPerson $person) { + return $person->myName(); + }, + ]) + ->getForm(); + $form->submit([ + 'name' => 'bar', + ]); + + $this->assertSame('bar', $person->myName()); + } } class SubmittedForm extends Form @@ -455,4 +476,9 @@ public function rename($name): void { $this->name = $name; } + + public function setName($name): void + { + $this->name = $name; + } } From 2aaec6734abcf69ae4d3a0bba933a4482858a198 Mon Sep 17 00:00:00 2001 From: HypeMC Date: Fri, 26 Apr 2024 01:20:55 +0200 Subject: [PATCH 89/95] [Security] Remove workflow from empty folder --- .../Guard/.github/PULL_REQUEST_TEMPLATE.md | 8 ---- .../.github/workflows/check-subtree-split.yml | 37 ------------------- 2 files changed, 45 deletions(-) delete mode 100644 src/Symfony/Component/Security/Guard/.github/PULL_REQUEST_TEMPLATE.md delete mode 100644 src/Symfony/Component/Security/Guard/.github/workflows/check-subtree-split.yml diff --git a/src/Symfony/Component/Security/Guard/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Security/Guard/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4689c4dad430e..0000000000000 --- a/src/Symfony/Component/Security/Guard/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,8 +0,0 @@ -Please do not submit any Pull Requests here. They will be closed. ---- - -Please submit your PR here instead: -https://github.com/symfony/symfony - -This repository is what we call a "subtree split": a read-only subset of that main repository. -We're looking forward to your PR there! diff --git a/src/Symfony/Component/Security/Guard/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Security/Guard/.github/workflows/check-subtree-split.yml deleted file mode 100644 index 16be48bae3113..0000000000000 --- a/src/Symfony/Component/Security/Guard/.github/workflows/check-subtree-split.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Check subtree split - -on: - pull_request_target: - -jobs: - close-pull-request: - runs-on: ubuntu-latest - - steps: - - name: Close pull request - uses: actions/github-script@v6 - with: - script: | - if (context.repo.owner === "symfony") { - github.rest.issues.createComment({ - owner: "symfony", - repo: context.repo.repo, - issue_number: context.issue.number, - body: ` - Thanks for your Pull Request! We love contributions. - - However, you should instead open your PR on the main repository: - https://github.com/symfony/symfony - - This repository is what we call a "subtree split": a read-only subset of that main repository. - We're looking forward to your PR there! - ` - }); - - github.rest.pulls.update({ - owner: "symfony", - repo: context.repo.repo, - pull_number: context.issue.number, - state: "closed" - }); - } From 600880e6b9d325da1d20ad01bbfb49b949a81d91 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 27 Apr 2024 10:58:07 +0200 Subject: [PATCH 90/95] detect wrong usages of minMessage/maxMessage in options --- .../Component/Validator/Constraints/Range.php | 2 +- .../Validator/Tests/Constraints/RangeTest.php | 56 +++++++++++++++++-- .../Tests/Constraints/RangeValidatorTest.php | 24 -------- 3 files changed, 53 insertions(+), 29 deletions(-) diff --git a/src/Symfony/Component/Validator/Constraints/Range.php b/src/Symfony/Component/Validator/Constraints/Range.php index 6a4cd900000ae..32c62104a6c50 100644 --- a/src/Symfony/Component/Validator/Constraints/Range.php +++ b/src/Symfony/Component/Validator/Constraints/Range.php @@ -95,7 +95,7 @@ public function __construct( throw new LogicException(sprintf('The "%s" constraint requires the Symfony PropertyAccess component to use the "minPropertyPath" or "maxPropertyPath" option. Try running "composer require symfony/property-access".', static::class)); } - if (null !== $this->min && null !== $this->max && ($minMessage || $maxMessage)) { + if (null !== $this->min && null !== $this->max && ($minMessage || $maxMessage || isset($options['minMessage']) || isset($options['maxMessage']))) { throw new ConstraintDefinitionException(sprintf('The "%s" constraint can not use "minMessage" and "maxMessage" when the "min" and "max" options are both set. Use "notInRangeMessage" instead.', static::class)); } } diff --git a/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php b/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php index 132be131d4073..a306b104a5763 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php @@ -30,7 +30,7 @@ public function testThrowsConstraintExceptionIfBothMinLimitAndPropertyPath() public function testThrowsConstraintExceptionIfBothMinLimitAndPropertyPathNamed() { - $this->expectException(\Symfony\Component\Validator\Exception\ConstraintDefinitionException::class); + $this->expectException(ConstraintDefinitionException::class); $this->expectExceptionMessage('requires only one of the "min" or "minPropertyPath" options to be set, not both.'); new Range(min: 'min', minPropertyPath: 'minPropertyPath'); } @@ -47,7 +47,7 @@ public function testThrowsConstraintExceptionIfBothMaxLimitAndPropertyPath() public function testThrowsConstraintExceptionIfBothMaxLimitAndPropertyPathNamed() { - $this->expectException(\Symfony\Component\Validator\Exception\ConstraintDefinitionException::class); + $this->expectException(ConstraintDefinitionException::class); $this->expectExceptionMessage('requires only one of the "max" or "maxPropertyPath" options to be set, not both.'); new Range(max: 'max', maxPropertyPath: 'maxPropertyPath'); } @@ -65,10 +65,58 @@ public function testThrowsNoDefaultOptionConfiguredException() new Range('value'); } - public function testThrowsConstraintDefinitionExceptionIfBothMinAndMaxAndMinMessageOrMaxMessage() + public function testThrowsConstraintDefinitionExceptionIfBothMinAndMaxAndMinMessageAndMaxMessage() { - $this->expectException(\Symfony\Component\Validator\Exception\ConstraintDefinitionException::class); + $this->expectException(ConstraintDefinitionException::class); $this->expectExceptionMessage('can not use "minMessage" and "maxMessage" when the "min" and "max" options are both set. Use "notInRangeMessage" instead.'); new Range(min: 'min', max: 'max', minMessage: 'minMessage', maxMessage: 'maxMessage'); } + + public function testThrowsConstraintDefinitionExceptionIfBothMinAndMaxAndMinMessage() + { + $this->expectException(ConstraintDefinitionException::class); + $this->expectExceptionMessage('can not use "minMessage" and "maxMessage" when the "min" and "max" options are both set. Use "notInRangeMessage" instead.'); + new Range(min: 'min', max: 'max', minMessage: 'minMessage'); + } + + public function testThrowsConstraintDefinitionExceptionIfBothMinAndMaxAndMaxMessage() + { + $this->expectException(ConstraintDefinitionException::class); + $this->expectExceptionMessage('can not use "minMessage" and "maxMessage" when the "min" and "max" options are both set. Use "notInRangeMessage" instead.'); + new Range(min: 'min', max: 'max', maxMessage: 'maxMessage'); + } + + public function testThrowsConstraintDefinitionExceptionIfBothMinAndMaxAndMinMessageAndMaxMessageOptions() + { + $this->expectException(ConstraintDefinitionException::class); + $this->expectExceptionMessage('can not use "minMessage" and "maxMessage" when the "min" and "max" options are both set. Use "notInRangeMessage" instead.'); + new Range([ + 'min' => 'min', + 'minMessage' => 'minMessage', + 'max' => 'max', + 'maxMessage' => 'maxMessage', + ]); + } + + public function testThrowsConstraintDefinitionExceptionIfBothMinAndMaxAndMinMessageOptions() + { + $this->expectException(ConstraintDefinitionException::class); + $this->expectExceptionMessage('can not use "minMessage" and "maxMessage" when the "min" and "max" options are both set. Use "notInRangeMessage" instead.'); + new Range([ + 'min' => 'min', + 'minMessage' => 'minMessage', + 'max' => 'max', + ]); + } + + public function testThrowsConstraintDefinitionExceptionIfBothMinAndMaxAndMaxMessageOptions() + { + $this->expectException(ConstraintDefinitionException::class); + $this->expectExceptionMessage('can not use "minMessage" and "maxMessage" when the "min" and "max" options are both set. Use "notInRangeMessage" instead.'); + new Range([ + 'min' => 'min', + 'max' => 'max', + 'maxMessage' => 'maxMessage', + ]); + } } diff --git a/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php index 876595c37fc94..c0eb5e61703a9 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php @@ -1037,30 +1037,6 @@ public static function provideMessageIfMinAndMaxSet(): array 'not_in_range_message', Range::NOT_IN_RANGE_ERROR, ], - [ - ['minMessage' => 'min_message'], - 0, - $notInRangeMessage, - Range::NOT_IN_RANGE_ERROR, - ], - [ - ['maxMessage' => 'max_message'], - 0, - $notInRangeMessage, - Range::NOT_IN_RANGE_ERROR, - ], - [ - ['minMessage' => 'min_message'], - 15, - $notInRangeMessage, - Range::NOT_IN_RANGE_ERROR, - ], - [ - ['maxMessage' => 'max_message'], - 15, - $notInRangeMessage, - Range::NOT_IN_RANGE_ERROR, - ], ]; } From 2a6107d487de3654495b21862c38acaaebd913c5 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 27 Apr 2024 11:31:10 +0200 Subject: [PATCH 91/95] detect wrong e-mail validation modes --- src/Symfony/Component/Validator/Constraints/Email.php | 4 ++++ .../Component/Validator/Tests/Constraints/EmailTest.php | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/src/Symfony/Component/Validator/Constraints/Email.php b/src/Symfony/Component/Validator/Constraints/Email.php index 912878de763c9..e9e0e06d3b8b7 100644 --- a/src/Symfony/Component/Validator/Constraints/Email.php +++ b/src/Symfony/Component/Validator/Constraints/Email.php @@ -62,6 +62,10 @@ public function __construct( throw new InvalidArgumentException('The "mode" parameter value is not valid.'); } + if (null !== $mode && !\in_array($mode, self::$validationModes, true)) { + throw new InvalidArgumentException('The "mode" parameter value is not valid.'); + } + parent::__construct($options, $groups, $payload); $this->message = $message ?? $this->message; diff --git a/src/Symfony/Component/Validator/Tests/Constraints/EmailTest.php b/src/Symfony/Component/Validator/Tests/Constraints/EmailTest.php index bf719b6f848fb..3451fdfb208e0 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/EmailTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/EmailTest.php @@ -33,6 +33,13 @@ public function testUnknownModesTriggerException() new Email(['mode' => 'Unknown Mode']); } + public function testUnknownModeArgumentsTriggerException() + { + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('The "mode" parameter value is not valid.'); + new Email(null, null, 'Unknown Mode'); + } + public function testNormalizerCanBeSet() { $email = new Email(['normalizer' => 'trim']); From 7c2da27a981197ad843359e036b3969fafadf13f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Andr=C3=A9?= Date: Thu, 25 Apr 2024 06:08:29 +0200 Subject: [PATCH 92/95] [AssetMapper] Check asset/vendor directory is writable --- .../ImportMap/RemotePackageStorage.php | 10 +++++-- .../Tests/ImportMap/ImportMapManagerTest.php | 16 +++++----- .../ImportMap/RemotePackageStorageTest.php | 29 +++++++++++++++---- 3 files changed, 39 insertions(+), 16 deletions(-) diff --git a/src/Symfony/Component/AssetMapper/ImportMap/RemotePackageStorage.php b/src/Symfony/Component/AssetMapper/ImportMap/RemotePackageStorage.php index f651033b6505e..b1c0cd5966b3d 100644 --- a/src/Symfony/Component/AssetMapper/ImportMap/RemotePackageStorage.php +++ b/src/Symfony/Component/AssetMapper/ImportMap/RemotePackageStorage.php @@ -11,6 +11,8 @@ namespace Symfony\Component\AssetMapper\ImportMap; +use Symfony\Component\AssetMapper\Exception\RuntimeException; + /** * Manages the local storage of remote/vendor importmap packages. */ @@ -52,7 +54,9 @@ public function save(ImportMapEntry $entry, string $contents): void $vendorPath = $this->getDownloadPath($entry->packageModuleSpecifier, $entry->type); @mkdir(\dirname($vendorPath), 0777, true); - file_put_contents($vendorPath, $contents); + if (false === @file_put_contents($vendorPath, $contents)) { + throw new RuntimeException(error_get_last()['message'] ?? sprintf('Failed to write file "%s".', $vendorPath)); + } } public function saveExtraFile(ImportMapEntry $entry, string $extraFilename, string $contents): void @@ -64,7 +68,9 @@ public function saveExtraFile(ImportMapEntry $entry, string $extraFilename, stri $vendorPath = $this->getExtraFileDownloadPath($entry, $extraFilename); @mkdir(\dirname($vendorPath), 0777, true); - file_put_contents($vendorPath, $contents); + if (false === @file_put_contents($vendorPath, $contents)) { + throw new RuntimeException(error_get_last()['message'] ?? sprintf('Failed to write file "%s".', $vendorPath)); + } } /** diff --git a/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapManagerTest.php b/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapManagerTest.php index 3198b11ee76a6..551a60492460d 100644 --- a/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapManagerTest.php +++ b/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapManagerTest.php @@ -201,15 +201,15 @@ public static function getRequirePackageTests(): iterable ]; yield 'single_package_with_a_path' => [ - 'packages' => [new PackageRequireOptions('some/module', path: self::$writableRoot.'/assets/some_file.js')], - 'expectedProviderPackageArgumentCount' => 0, - 'resolvedPackages' => [], - 'expectedImportMap' => [ - 'some/module' => [ - // converted to relative path - 'path' => './assets/some_file.js', + 'packages' => [new PackageRequireOptions('some/module', path: self::$writableRoot.'/assets/some_file.js')], + 'expectedProviderPackageArgumentCount' => 0, + 'resolvedPackages' => [], + 'expectedImportMap' => [ + 'some/module' => [ + // converted to relative path + 'path' => './assets/some_file.js', + ], ], - ], ]; } diff --git a/src/Symfony/Component/AssetMapper/Tests/ImportMap/RemotePackageStorageTest.php b/src/Symfony/Component/AssetMapper/Tests/ImportMap/RemotePackageStorageTest.php index 4d41f4b61ce1f..0019f604cc8c5 100644 --- a/src/Symfony/Component/AssetMapper/Tests/ImportMap/RemotePackageStorageTest.php +++ b/src/Symfony/Component/AssetMapper/Tests/ImportMap/RemotePackageStorageTest.php @@ -25,7 +25,7 @@ class RemotePackageStorageTest extends TestCase protected function setUp(): void { $this->filesystem = new Filesystem(); - if (!file_exists(self::$writableRoot)) { + if (!$this->filesystem->exists(self::$writableRoot)) { $this->filesystem->mkdir(self::$writableRoot); } } @@ -41,14 +41,30 @@ public function testGetStorageDir() $this->assertSame(realpath(self::$writableRoot.'/assets/vendor'), realpath($storage->getStorageDir())); } + public function testSaveThrowsWhenVendorDirectoryIsNotWritable() + { + $this->filesystem->mkdir($vendorDir = self::$writableRoot.'/assets/acme/vendor'); + $this->filesystem->chmod($vendorDir, 0555); + + $storage = new RemotePackageStorage($vendorDir); + $entry = ImportMapEntry::createRemote('foo', ImportMapType::JS, '/does/not/matter', '1.0.0', 'module_specifier', false); + + $this->expectException(\RuntimeException::class); + $this->expectExceptionMessage('file_put_contents('.$vendorDir.'/module_specifier/module_specifier.index.js): Failed to open stream: No such file or directory'); + $storage->save($entry, 'any content'); + + $this->filesystem->remove($vendorDir); + } + public function testIsDownloaded() { $storage = new RemotePackageStorage(self::$writableRoot.'/assets/vendor'); $entry = ImportMapEntry::createRemote('foo', ImportMapType::JS, '/does/not/matter', '1.0.0', 'module_specifier', false); $this->assertFalse($storage->isDownloaded($entry)); + $targetPath = self::$writableRoot.'/assets/vendor/module_specifier/module_specifier.index.js'; - @mkdir(\dirname($targetPath), 0777, true); - file_put_contents($targetPath, 'any content'); + $this->filesystem->mkdir(\dirname($targetPath)); + $this->filesystem->dumpFile($targetPath, 'any content'); $this->assertTrue($storage->isDownloaded($entry)); } @@ -57,9 +73,10 @@ public function testIsExtraFileDownloaded() $storage = new RemotePackageStorage(self::$writableRoot.'/assets/vendor'); $entry = ImportMapEntry::createRemote('foo', ImportMapType::JS, '/does/not/matter', '1.0.0', 'module_specifier', false); $this->assertFalse($storage->isExtraFileDownloaded($entry, '/path/to/extra.woff')); + $targetPath = self::$writableRoot.'/assets/vendor/module_specifier/path/to/extra.woff'; - @mkdir(\dirname($targetPath), 0777, true); - file_put_contents($targetPath, 'any content'); + $this->filesystem->mkdir(\dirname($targetPath)); + $this->filesystem->dumpFile($targetPath, 'any content'); $this->assertTrue($storage->isExtraFileDownloaded($entry, '/path/to/extra.woff')); } @@ -92,7 +109,7 @@ public function testGetDownloadedPath(string $packageModuleSpecifier, ImportMapT $this->assertSame($expectedPath, $storage->getDownloadPath($packageModuleSpecifier, $importMapType)); } - public static function getDownloadPathTests() + public static function getDownloadPathTests(): iterable { yield 'javascript bare package' => [ 'packageModuleSpecifier' => 'foo', From ea61ad30ee8c2f4162b64dec47f929b72f3e516f Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 28 Apr 2024 12:38:38 +0200 Subject: [PATCH 93/95] fix merge --- src/Symfony/Component/Validator/Constraints/Email.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Constraints/Email.php b/src/Symfony/Component/Validator/Constraints/Email.php index 9f4e3778936c6..ddc740abf2011 100644 --- a/src/Symfony/Component/Validator/Constraints/Email.php +++ b/src/Symfony/Component/Validator/Constraints/Email.php @@ -68,7 +68,7 @@ public function __construct( throw new InvalidArgumentException('The "mode" parameter value is not valid.'); } - if (null !== $mode && !\in_array($mode, self::$validationModes, true)) { + if (null !== $mode && !\in_array($mode, self::VALIDATION_MODES, true)) { throw new InvalidArgumentException('The "mode" parameter value is not valid.'); } From f631ad655f44a3129f259bad798ae7765a336a22 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 29 Apr 2024 13:24:39 +0200 Subject: [PATCH 94/95] Update CHANGELOG for 6.4.7 --- CHANGELOG-6.4.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/CHANGELOG-6.4.md b/CHANGELOG-6.4.md index 2e0f70ad13e6a..72e7ab9352c8d 100644 --- a/CHANGELOG-6.4.md +++ b/CHANGELOG-6.4.md @@ -7,6 +7,46 @@ in 6.4 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v6.4.0...v6.4.1 +* 6.4.7 (2024-04-29) + + * bug #54699 [DoctrineBridge] Update AbstractSchemaListener to adjust more database params (ywisax) + * bug #54691 [Finder] Also consider .git inside the basedir of in() directory (nickvergessen) + * bug #54724 [AssetMapper] Check asset/vendor directory is writable (smnandre) + * bug #54750 [Validator] detect wrong usages of minMessage/maxMessage in options (xabbuh) + * bug #54751 [Validator]  detect wrong e-mail validation modes (xabbuh) + * bug #54723 [Form] read form values using the chain data accessor (xabbuh) + * bug #54706 [Yaml] call substr() with integer offsets (xabbuh) + * bug #54675 [PropertyInfo] Fix PHPStan properties type in trait (mtarld) + * bug #54673 [Messenger] explicitly cast boolean SSL stream options (xabbuh) + * bug #54665 Add test for AccessTokenHeaderRegex and adjust regex (Spomky) + * bug #54635 [Serializer] Revert "Fix object normalizer when properties has the same name as their accessor" - it was a BC Break (NeilPeyssard) + * bug #54625 [Intl] Remove resources data from classmap generation (shyim) + * bug #54598 [TwigBridge]  implement NodeVisitorInterface instead of extending AbstractNodeVisitor (xabbuh) + * bug #54072 [HttpKernel] Fix datacollector caster for reference object property (ebuildy) + * bug #54395 [Serializer] Fixing PHP warning in the ObjectNormalizer with MaxDepth enabled (jaydiablo) + * bug #54564 [Translation] Skip state=needs-translation entries only when source == target (nicolas-grekas) + * bug #54579 [Cache] Always select database for persistent redis connections (uncaught) + * bug #54059 [Security] Validate that CSRF token in form login is string similar to username/password (glaubinix) + * bug #54530 [Clock] initialize the current time with midnight before modifying the date (xabbuh) + * bug #54547 [HttpKernel] Force non lazy controller services (smnandre) + * bug #54517 [HttpClient] Let curl handle transfer encoding (michaelhue) + * bug #52917 [Serializer] Fix unexpected allowed attributes (mtarld) + * bug #54063 [FrameworkBundle] Fix registration of the bundle path to translation (FlyingDR) + * bug #54392 [Messenger] Make Doctrine connection ignore unrelated tables on setup (MatTheCat) + * bug #54513 [HtmlSanitizer] Ignore Processing Instructions (smnandre) + * bug #54506 [HttpFoundation] Set content-type header in RedirectResponse (smnandre) + * bug #52698 [Serializer] Fix XML scalar to object denormalization (mtarld) + * bug #54485 [Serializer] Ignore when using #[Ignore] on a non-accessor (nicolas-grekas) + * bug #54105 [Messenger] Improve deadlock handling on `ack()` and `reject()` (jwage) + * bug #54242 [HttpClient] [EventSourceHttpClient] Fix consuming SSEs with \r\n separator (fancyweb) + * bug #54487 [Validator] Accept `Stringable` in `ExecutionContext::build/addViolation()` (alexandre-daubois) + * bug #54456 [DomCrawler] Encode html entities only if nessecary (ausi) + * bug #54484 [Serializer] reset backed_enum priority, and re-prioritise translatable (GwendolenLynch) + * bug #54471 [Filesystem] Strengthen the check of file permissions in `dumpFile` (alexandre-daubois) + * bug #54403 [FrameworkBundle] [Command] Fix #54402: Suppress PHP warning when is_readable() tries to access dirs outside of open_basedir restrictions (Jeldrik Geraedts) + * bug #54440 [Console] return null when message with name is not set (xabbuh) + * bug #54468 [Translation] Fix LocaleSwitcher throws when intl not loaded (smnandre) + * 6.4.6 (2024-04-03) * bug #54400 [HttpClient] stop all server processes after tests have run (xabbuh) From be31b0b0d7b2ae5e01123cfcadb4b6b80d0be311 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 29 Apr 2024 13:24:44 +0200 Subject: [PATCH 95/95] Update VERSION for 6.4.7 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 95ad28ee92e77..d0926d42fbbdb 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -76,12 +76,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ private static array $freshCache = []; - public const VERSION = '6.4.7-DEV'; + public const VERSION = '6.4.7'; public const VERSION_ID = 60407; public const MAJOR_VERSION = 6; public const MINOR_VERSION = 4; public const RELEASE_VERSION = 7; - public const EXTRA_VERSION = 'DEV'; + public const EXTRA_VERSION = ''; public const END_OF_MAINTENANCE = '11/2026'; public const END_OF_LIFE = '11/2027';