From 3227303dab98b04a2797df8184fd018200534050 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 9 Sep 2020 18:58:25 +0200 Subject: [PATCH 1/7] allow consumers to mock all methods --- .../Test/ConstraintValidatorTestCase.php | 56 ++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php b/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php index 3d1fc81c9a..1b4a151826 100644 --- a/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php +++ b/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php @@ -112,10 +112,44 @@ abstract class ConstraintValidatorTestCase extends TestCase $context->setNode($this->value, $this->object, $this->metadata, $this->propertyPath); $context->setConstraint($this->constraint); + $contextualValidator = $this->getMockBuilder(AssertingContextualValidator::class) + ->setMethods([ + 'atPath', + 'validate', + 'validateProperty', + 'validatePropertyValue', + 'getViolations', + ]) + ->getMock(); + $contextualValidator->expects($this->any()) + ->method('atPath') + ->willReturnCallback(function ($path) use ($contextualValidator) { + return $contextualValidator->doAtPath($path); + }); + $contextualValidator->expects($this->any()) + ->method('validate') + ->willReturnCallback(function ($value, $constraints = null, $groups = null) use ($contextualValidator) { + return $contextualValidator->doValidate($value, $constraints, $groups); + }); + $contextualValidator->expects($this->any()) + ->method('validateProperty') + ->willReturnCallback(function ($object, $propertyName, $groups = null) use ($contextualValidator) { + return $contextualValidator->validateProperty($object, $propertyName, $groups); + }); + $contextualValidator->expects($this->any()) + ->method('validatePropertyValue') + ->willReturnCallback(function ($objectOrClass, $propertyName, $value, $groups = null) use ($contextualValidator) { + return $contextualValidator->doValidatePropertyValue($objectOrClass, $propertyName, $value, $groups); + }); + $contextualValidator->expects($this->any()) + ->method('getViolations') + ->willReturnCallback(function () use ($contextualValidator) { + return $contextualValidator->doGetViolations(); + }); $validator->expects($this->any()) ->method('inContext') ->with($context) - ->willReturn($this->getMockBuilder(AssertingContextualValidator::class)->setMethods(null)->getMock()); + ->willReturn($contextualValidator); return $context; } @@ -353,6 +387,10 @@ class AssertingContextualValidator implements ContextualValidatorInterface private $expectedValidate = []; public function atPath($path) + { + } + + public function doAtPath($path) { Assert::assertFalse($this->expectNoValidate, 'No validation calls have been expected.'); @@ -366,6 +404,10 @@ class AssertingContextualValidator implements ContextualValidatorInterface } public function validate($value, $constraints = null, $groups = null) + { + } + + public function doValidate($value, $constraints = null, $groups = null) { Assert::assertFalse($this->expectNoValidate, 'No validation calls have been expected.'); @@ -379,11 +421,19 @@ class AssertingContextualValidator implements ContextualValidatorInterface } public function validateProperty($object, $propertyName, $groups = null) + { + } + + public function doValidateProperty($object, $propertyName, $groups = null) { return $this; } public function validatePropertyValue($objectOrClass, $propertyName, $value, $groups = null) + { + } + + public function doValidatePropertyValue($objectOrClass, $propertyName, $value, $groups = null) { return $this; } @@ -392,6 +442,10 @@ class AssertingContextualValidator implements ContextualValidatorInterface { } + public function doGetViolations() + { + } + public function expectNoValidate() { $this->expectNoValidate = true; From 4dcf9e7d13a25932b2ab15d1264f6e9420ad97f9 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 10 Sep 2020 11:46:19 +0200 Subject: [PATCH 2/7] [DI] dump OS-indepent paths in the compiled container --- .../DependencyInjection/Dumper/PhpDumper.php | 10 +++++++++- .../Tests/Dumper/PhpDumperTest.php | 12 ++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index 520a886deb..92d039c9ed 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -2017,7 +2017,15 @@ EOF; $suffix = $matches[0][1] + \strlen($matches[0][0]); $matches[0][1] += \strlen($matches[1][0]); $prefix = $matches[0][1] ? $this->doExport(substr($value, 0, $matches[0][1]), true).'.' : ''; - $suffix = isset($value[$suffix]) ? '.'.$this->doExport(substr($value, $suffix), true) : ''; + + if ('\\' === \DIRECTORY_SEPARATOR && isset($value[$suffix])) { + $cookie = '\\'.random_int(100000, \PHP_INT_MAX); + $suffix = '.'.$this->doExport(str_replace('\\', $cookie, substr($value, $suffix)), true); + $suffix = str_replace('\\'.$cookie, "'.\\DIRECTORY_SEPARATOR.'", $suffix); + } else { + $suffix = isset($value[$suffix]) ? '.'.$this->doExport(substr($value, $suffix), true) : ''; + } + $dirname = $this->asFiles ? '$this->containerDir' : '__DIR__'; $offset = 2 + $this->targetDirMaxMatches - \count($matches); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php index de88e8b22f..5875253d86 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php @@ -233,7 +233,7 @@ class PhpDumperTest extends TestCase $dumper = new PhpDumper($container); $dump = print_r($dumper->dump(['as_files' => true, 'file' => __DIR__, 'hot_path_tag' => 'hot']), true); if ('\\' === \DIRECTORY_SEPARATOR) { - $dump = str_replace('\\\\Fixtures\\\\includes\\\\foo.php', '/Fixtures/includes/foo.php', $dump); + $dump = str_replace("'.\\DIRECTORY_SEPARATOR.'", '/', $dump); } $this->assertStringMatchesFormatFile(self::$fixturesPath.'/php/services9_as_files.txt', $dump); } @@ -260,7 +260,7 @@ class PhpDumperTest extends TestCase $dump = print_r($dumper->dump(['as_files' => true, 'file' => __DIR__, 'hot_path_tag' => 'hot', 'build_time' => 1563381341]), true); if ('\\' === \DIRECTORY_SEPARATOR) { - $dump = str_replace('\\\\Fixtures\\\\includes\\\\', '/Fixtures/includes/', $dump); + $dump = str_replace("'.\\DIRECTORY_SEPARATOR.'", '/', $dump); } $this->assertStringMatchesFormatFile(self::$fixturesPath.'/php/services9_inlined_factories.txt', $dump); } @@ -286,7 +286,7 @@ class PhpDumperTest extends TestCase $dump = print_r($dumper->dump(['as_files' => true, 'file' => __DIR__, 'hot_path_tag' => 'hot', 'build_time' => 1563381341]), true); if ('\\' === \DIRECTORY_SEPARATOR) { - $dump = str_replace('\\\\Fixtures\\\\includes\\\\', '/Fixtures/includes/', $dump); + $dump = str_replace("'.\\DIRECTORY_SEPARATOR.'", '/', $dump); } $this->assertStringMatchesFormatFile(self::$fixturesPath.'/php/services9_lazy_inlined_factories.txt', $dump); } @@ -304,7 +304,7 @@ class PhpDumperTest extends TestCase $dump = print_r($dumper->dump(['as_files' => true, 'file' => __DIR__]), true); if ('\\' === \DIRECTORY_SEPARATOR) { - $dump = str_replace('\\\\Fixtures\\\\includes\\\\foo_lazy.php', '/Fixtures/includes/foo_lazy.php', $dump); + $dump = str_replace("'.\\DIRECTORY_SEPARATOR.'", '/', $dump); } $this->assertStringMatchesFormatFile(self::$fixturesPath.'/php/services_non_shared_lazy_as_files.txt', $dump); } @@ -980,7 +980,7 @@ class PhpDumperTest extends TestCase $dumper = new PhpDumper($container); - $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_array_params.php', str_replace('\\\\Dumper', '/Dumper', $dumper->dump(['file' => self::$fixturesPath.'/php/services_array_params.php']))); + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_array_params.php', str_replace("'.\\DIRECTORY_SEPARATOR.'", '/', $dumper->dump(['file' => self::$fixturesPath.'/php/services_array_params.php']))); } public function testExpressionReferencingPrivateService() @@ -1143,7 +1143,7 @@ class PhpDumperTest extends TestCase $dump = $dumper->dump(['hot_path_tag' => 'container.hot_path', 'inline_class_loader_parameter' => 'inline_requires', 'file' => self::$fixturesPath.'/php/services_inline_requires.php']); if ('\\' === \DIRECTORY_SEPARATOR) { - $dump = str_replace("'\\\\includes\\\\HotPath\\\\", "'/includes/HotPath/", $dump); + $dump = str_replace("'.\\DIRECTORY_SEPARATOR.'", '/', $dump); } $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_inline_requires.php', $dump); From 15c21db8569a07814c6f65d205b7f39fa3f54172 Mon Sep 17 00:00:00 2001 From: Lars Strojny Date: Wed, 9 Sep 2020 12:57:09 +0200 Subject: [PATCH 3/7] [Cache] Limit cache version character range --- src/Symfony/Component/Cache/Simple/AbstractCache.php | 2 +- src/Symfony/Component/Cache/Traits/AbstractTrait.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Cache/Simple/AbstractCache.php b/src/Symfony/Component/Cache/Simple/AbstractCache.php index 732fa337da..b048807591 100644 --- a/src/Symfony/Component/Cache/Simple/AbstractCache.php +++ b/src/Symfony/Component/Cache/Simple/AbstractCache.php @@ -182,7 +182,7 @@ abstract class AbstractCache implements Psr16CacheInterface, LoggerAwareInterfac try { foreach ($values as $id => $value) { if (!isset($keys[$id])) { - $id = key($keys); + throw new InvalidArgumentException(sprintf('Could not match value id "%s" to keys "%s".', $id, implode('", "', $keys))); } $key = $keys[$id]; unset($keys[$id]); diff --git a/src/Symfony/Component/Cache/Traits/AbstractTrait.php b/src/Symfony/Component/Cache/Traits/AbstractTrait.php index d4a16959a8..2e7e2c89f6 100644 --- a/src/Symfony/Component/Cache/Traits/AbstractTrait.php +++ b/src/Symfony/Component/Cache/Traits/AbstractTrait.php @@ -119,7 +119,7 @@ trait AbstractTrait } } $namespaceToClear = $this->namespace.$namespaceVersionToClear; - $namespaceVersion = substr_replace(base64_encode(pack('V', mt_rand())), static::NS_SEPARATOR, 5); + $namespaceVersion = strtr(substr_replace(base64_encode(pack('V', mt_rand())), static::NS_SEPARATOR, 5), '/', '_'); try { $cleared = $this->doSave([static::NS_SEPARATOR.$this->namespace => $namespaceVersion], 0); } catch (\Exception $e) { @@ -268,7 +268,7 @@ trait AbstractTrait $this->namespaceVersion = $v; } if ('1'.static::NS_SEPARATOR === $this->namespaceVersion) { - $this->namespaceVersion = substr_replace(base64_encode(pack('V', time())), static::NS_SEPARATOR, 5); + $this->namespaceVersion = strtr(substr_replace(base64_encode(pack('V', time())), static::NS_SEPARATOR, 5), '/', '_'); $this->doSave([static::NS_SEPARATOR.$this->namespace => $this->namespaceVersion], 0); } } catch (\Exception $e) { From 1b5f9963785329376594772f21cf28a6573d0916 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 11 Sep 2020 07:50:30 +0200 Subject: [PATCH 4/7] Fix CS --- .../NumberToLocalizedStringTransformer.php | 2 +- .../Component/Form/Tests/AbstractRequestHandlerTest.php | 8 ++++---- .../Component/HttpClient/Tests/CachingHttpClientTest.php | 4 ++-- .../Component/Intl/NumberFormatter/NumberFormatter.php | 4 ++-- .../Component/Messenger/Retry/MultiplierRetryStrategy.php | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php index 177be77a1e..9262b6249c 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php @@ -251,7 +251,7 @@ class NumberToLocalizedStringTransformer implements DataTransformerInterface { if (null !== $this->scale && null !== $this->roundingMode) { // shift number to maintain the correct scale during rounding - $roundingCoef = pow(10, $this->scale); + $roundingCoef = 10 ** $this->scale; // string representation to avoid rounding errors, similar to bcmul() $number = (string) ($number * $roundingCoef); diff --git a/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php b/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php index b7e6eef38b..5e8facd4cf 100644 --- a/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php @@ -338,10 +338,10 @@ abstract class AbstractRequestHandlerTest extends TestCase public function getPostMaxSizeFixtures() { return [ - [pow(1024, 3) + 1, '1G', true, ['{{ max }}' => '1G']], - [pow(1024, 3), '1G', false], - [pow(1024, 2) + 1, '1M', true, ['{{ max }}' => '1M']], - [pow(1024, 2), '1M', false], + [1024 ** 3 + 1, '1G', true, ['{{ max }}' => '1G']], + [1024 ** 3, '1G', false], + [1024 ** 2 + 1, '1M', true, ['{{ max }}' => '1M']], + [1024 ** 2, '1M', false], [1024 + 1, '1K', true, ['{{ max }}' => '1K']], [1024, '1K', false], [null, '1K', false], diff --git a/src/Symfony/Component/HttpClient/Tests/CachingHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/CachingHttpClientTest.php index 0525feed6c..ad07f86451 100644 --- a/src/Symfony/Component/HttpClient/Tests/CachingHttpClientTest.php +++ b/src/Symfony/Component/HttpClient/Tests/CachingHttpClientTest.php @@ -89,7 +89,7 @@ class CachingHttpClientTest extends TestCase 'test', [ 'response_headers' => [ 'X-Content-Digest' => 'some-hash', - ] + ], ])); $headers = $response->getHeaders(); @@ -100,7 +100,7 @@ class CachingHttpClientTest extends TestCase { $mockClient = new MockHttpClient($mockResponse); - $store = new Store(sys_get_temp_dir() . '/sf_http_cache'); + $store = new Store(sys_get_temp_dir().'/sf_http_cache'); $client = new CachingHttpClient($mockClient, $store); $response = $client->request('GET', 'http://test'); diff --git a/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php b/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php index a88aa3d93b..8350bc4e4a 100644 --- a/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php +++ b/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php @@ -699,7 +699,7 @@ abstract class NumberFormatter // Swiss rounding if (0 < $roundingIncrement && 0 < $fractionDigits) { - $roundingFactor = $roundingIncrement / pow(10, $fractionDigits); + $roundingFactor = $roundingIncrement / 10 ** $fractionDigits; $value = round($value / $roundingFactor) * $roundingFactor; } @@ -721,7 +721,7 @@ abstract class NumberFormatter if (isset(self::$phpRoundingMap[$roundingModeAttribute])) { $value = round($value, $precision, self::$phpRoundingMap[$roundingModeAttribute]); } elseif (isset(self::$customRoundingList[$roundingModeAttribute])) { - $roundingCoef = pow(10, $precision); + $roundingCoef = 10 ** $precision; $value *= $roundingCoef; $value = (float) (string) $value; diff --git a/src/Symfony/Component/Messenger/Retry/MultiplierRetryStrategy.php b/src/Symfony/Component/Messenger/Retry/MultiplierRetryStrategy.php index 5a4ec9a6b8..ba3dacf251 100644 --- a/src/Symfony/Component/Messenger/Retry/MultiplierRetryStrategy.php +++ b/src/Symfony/Component/Messenger/Retry/MultiplierRetryStrategy.php @@ -74,7 +74,7 @@ class MultiplierRetryStrategy implements RetryStrategyInterface { $retries = RedeliveryStamp::getRetryCountFromEnvelope($message); - $delay = $this->delayMilliseconds * pow($this->multiplier, $retries); + $delay = $this->delayMilliseconds * $this->multiplier ** $retries; if ($delay > $this->maxDelayMilliseconds && 0 !== $this->maxDelayMilliseconds) { return $this->maxDelayMilliseconds; From 96759af1da51fc24863303609f24b63ec86cd5b3 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 10 Sep 2020 20:19:03 +0200 Subject: [PATCH 5/7] [HttpClient] fail properly when the server replies with HTTP/0.9 --- .../Component/HttpClient/Response/CurlResponse.php | 13 +++++++++++++ .../Component/HttpClient/Response/ResponseTrait.php | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpClient/Response/CurlResponse.php b/src/Symfony/Component/HttpClient/Response/CurlResponse.php index a65004675d..29f82ac9b7 100644 --- a/src/Symfony/Component/HttpClient/Response/CurlResponse.php +++ b/src/Symfony/Component/HttpClient/Response/CurlResponse.php @@ -123,6 +123,19 @@ final class CurlResponse implements ResponseInterface } curl_setopt($ch, \CURLOPT_WRITEFUNCTION, static function ($ch, string $data) use ($multi, $id): int { + if ('H' === (curl_getinfo($ch, \CURLINFO_PRIVATE)[0] ?? null)) { + $multi->handlesActivity[$id][] = null; + $multi->handlesActivity[$id][] = new TransportException(sprintf('Unsupported protocol for "%s"', curl_getinfo($ch, \CURLINFO_EFFECTIVE_URL))); + + return 0; + } + + curl_setopt($ch, \CURLOPT_WRITEFUNCTION, static function ($ch, string $data) use ($multi, $id): int { + $multi->handlesActivity[$id][] = $data; + + return \strlen($data); + }); + $multi->handlesActivity[$id][] = $data; return \strlen($data); diff --git a/src/Symfony/Component/HttpClient/Response/ResponseTrait.php b/src/Symfony/Component/HttpClient/Response/ResponseTrait.php index 462ed16c89..3928343732 100644 --- a/src/Symfony/Component/HttpClient/Response/ResponseTrait.php +++ b/src/Symfony/Component/HttpClient/Response/ResponseTrait.php @@ -270,7 +270,7 @@ trait ResponseTrait $debug .= "< \r\n"; if (!$info['http_code']) { - throw new TransportException('Invalid or missing HTTP status line.'); + throw new TransportException(sprintf('Invalid or missing HTTP status line for "%s".', implode('', $info['url']))); } } @@ -350,7 +350,7 @@ trait ResponseTrait if (\is_string($chunk = array_shift($multi->handlesActivity[$j]))) { if (null !== $response->inflate && false === $chunk = @inflate_add($response->inflate, $chunk)) { - $multi->handlesActivity[$j] = [null, new TransportException('Error while processing content unencoding.')]; + $multi->handlesActivity[$j] = [null, new TransportException(sprintf('Error while processing content unencoding for "%s".', $response->getInfo('url')))]; continue; } From d3af877022d464bb18e9c3493cec2ab351f24414 Mon Sep 17 00:00:00 2001 From: David Maicher Date: Fri, 4 Sep 2020 20:10:14 +0200 Subject: [PATCH 6/7] [Cache] fix ProxyAdapter not persisting items with infinite expiration --- .../Component/Cache/Adapter/ProxyAdapter.php | 2 +- ...TagAwareAndProxyAdapterIntegrationTest.php | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Cache/Adapter/ProxyAdapter.php b/src/Symfony/Component/Cache/Adapter/ProxyAdapter.php index a03c582d8c..b126b5a7c8 100644 --- a/src/Symfony/Component/Cache/Adapter/ProxyAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/ProxyAdapter.php @@ -88,7 +88,7 @@ class ProxyAdapter implements AdapterInterface, CacheInterface, PruneableInterfa $item["\0*\0value"] = ["\x9D".pack('VN', (int) (0.1 + $metadata[self::METADATA_EXPIRY] - self::METADATA_EXPIRY_OFFSET), $metadata[self::METADATA_CTIME])."\x5F" => $item["\0*\0value"]]; } $innerItem->set($item["\0*\0value"]); - $innerItem->expiresAt(null !== $item["\0*\0expiry"] ? \DateTime::createFromFormat('U.u', sprintf('%.6f', $item["\0*\0expiry"])) : null); + $innerItem->expiresAt(null !== $item["\0*\0expiry"] ? \DateTime::createFromFormat('U.u', sprintf('%.6f', 0 === $item["\0*\0expiry"] ? \PHP_INT_MAX : $item["\0*\0expiry"])) : null); }, null, CacheItem::class diff --git a/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAndProxyAdapterIntegrationTest.php b/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAndProxyAdapterIntegrationTest.php index e53b407028..4f30fdddd1 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAndProxyAdapterIntegrationTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAndProxyAdapterIntegrationTest.php @@ -24,6 +24,29 @@ class TagAwareAndProxyAdapterIntegrationTest extends TestCase $cache->save($item); $this->assertSame('bar', $cache->getItem('foo')->get()); + + $cache->invalidateTags(['tag2']); + + $this->assertFalse($cache->getItem('foo')->isHit()); + } + + public function testIntegrationUsingProxiedAdapterForTagsPool() + { + $arrayAdapter = new ArrayAdapter(); + $cache = new TagAwareAdapter($arrayAdapter, new ProxyAdapter($arrayAdapter)); + + $item = $cache->getItem('foo'); + $item->expiresAfter(600); + $item->tag(['baz']); + $item->set('bar'); + $cache->save($item); + + $this->assertSame('bar', $cache->getItem('foo')->get()); + $this->assertTrue($cache->getItem('foo')->isHit()); + + $cache->invalidateTags(['baz']); + + $this->assertFalse($cache->getItem('foo')->isHit()); } public function dataProvider(): array From e927c7cf691654b2b9afb3c18326383790b3247f Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 11 Sep 2020 11:15:40 +0200 Subject: [PATCH 7/7] add mising sr (latn & cyrl) translations --- .../translations/validators.sr_Cyrl.xlf | 20 +++++++++++++++++++ .../translations/validators.sr_Latn.xlf | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) 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 3f2b9eaba8..fce95a0769 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf @@ -366,6 +366,26 @@ This value should be between {{ min }} and {{ max }}. Ова вредност треба да буде између {{ min }} и {{ max }}. + + This value is not a valid hostname. + Ова вредност није исправно име послужитеља (hostname). + + + The number of elements in this collection should be a multiple of {{ compared_value }}. + Број елемената у овој колекцији би требало да буде дељив са {{ compared_value }}. + + + This value should satisfy at least one of the following constraints: + Ова вредност би требало да задовољава најмање једно од наредних ограничења: + + + Each element of this collection should satisfy its own set of constraints. + Сваки елемент ове колекције би требало да задовољи сопствени скуп ограничења. + + + This value is not a valid International Securities Identification Number (ISIN). + Ова вредност није исправна међународна идентификациона ознака хартија од вредности (ISIN). + 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 43d2070ab7..06b164be8a 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf @@ -366,6 +366,26 @@ This value should be between {{ min }} and {{ max }}. Ova vrednost treba da bude između {{ min }} i {{ max }}. + + This value is not a valid hostname. + Ova vrednost nije ispravno ime poslužitelja (hostname). + + + The number of elements in this collection should be a multiple of {{ compared_value }}. + Broj elemenata u ovoj kolekciji bi trebalo da bude deljiv sa {{ compared_value }}. + + + This value should satisfy at least one of the following constraints: + Ova vrednost bi trebalo da zadovoljava namjanje jedno od narednih ograničenja: + + + Each element of this collection should satisfy its own set of constraints. + Svaki element ove kolekcije bi trebalo da zadovolji sopstveni skup ograničenja. + + + This value is not a valid International Securities Identification Number (ISIN). + Ova vrednost nije ispravna međunarodna identifikaciona oznaka hartija od vrednosti (ISIN). +