10000 Merge branch '5.0' · symfony/symfony@3f23a45 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3f23a45

Browse files
Merge branch '5.0'
* 5.0: fix merge Fix more quotes in exception messages Fix more quotes in exception messages Fix more quotes in exception messages [3.4] Minor fixes [PropertyAccess] Improved errors when reading uninitialized properties
2 parents c0ee02b + 000ffb2 commit 3f23a45

File tree

21 files changed

+60
-21
lines changed

21 files changed

+60
-21
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder
11221122
if ($container->fileExists($dir)) {
11231123
$dirs[] = $transPaths[] = $dir;
11241124
} else {
1125-
throw new \UnexpectedValueException(sprintf('%s defined in translator.paths does not exist or is not a directory.', $dir));
1125+
throw new \UnexpectedValueException(sprintf('"%s" defined in translator.paths does not exist or is not a directory.', $dir));
11261126
}
11271127
}
11281128

src/Symfony/Component/Cache/Traits/RedisTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private function init($redisClient, string $namespace, int $defaultLifetime, ?Ma
5656
}
5757

5858
if (!$redisClient instanceof \Redis && !$redisClient instanceof \RedisArray && !$redisClient instanceof \RedisCluster && !$redisClient instanceof \Predis\ClientInterface && !$redisClient instanceof RedisProxy && !$redisClient instanceof RedisClusterProxy) {
59-
throw new InvalidArgumentException(sprintf('%s() expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\ClientInterface, "%s" given.', __METHOD__, get_debug_type($redisClient)));
59+
throw new InvalidArgumentException(sprintf('"%s()" expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\ClientInterface, "%s" given.', __METHOD__, get_debug_type($redisClient)));
6060
}
6161

6262
if ($redisClient instanceof \Predis\ClientInterface && $redisClient->getOptions()->exceptions) {

src/Symfony/Component/HttpClient/CurlHttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ public function stream($responses, float $timeout = null): ResponseStreamInterfa
319319
if ($responses instanceof CurlResponse) {
320320
$responses = [$responses];
321321
} elseif (!is_iterable($responses)) {
322-
throw new \TypeError(sprintf('%s() expects parameter 1 to be an iterable of CurlResponse objects, "%s" given.', __METHOD__, get_debug_type($responses)));
322+
throw new \TypeError(sprintf('"%s()" expects parameter 1 to be an iterable of CurlResponse objects, "%s" given.', __METHOD__, get_debug_type($responses)));
323323
}
324324

325325
$active = 0;

src/Symfony/Component/HttpClient/MockHttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function stream($responses, float $timeout = null): ResponseStreamInterfa
8282
if ($responses instanceof ResponseInterface) {
8383
$responses = [$responses];
8484
} elseif (!is_iterable($responses)) {
85-
throw new \TypeError(sprintf('%s() expects parameter 1 to be an iterable of MockResponse objects, "%s" given.', __METHOD__, get_debug_type($responses)));
85+
throw new \TypeError(sprintf('"%s()" expects parameter 1 to be an iterable of MockResponse objects, "%s" given.', __METHOD__, get_debug_type($responses)));
8686
}
8787

8888
return new ResponseStream(MockResponse::stream($responses, $timeout));

src/Symfony/Component/HttpClient/NativeHttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ public function stream($responses, float $timeout = null): ResponseStreamInterfa
235235
if ($responses instanceof NativeResponse) {
236236
$responses = [$responses];
237237
} elseif (!is_iterable($responses)) {
238-
throw new \TypeError(sprintf('%s() expects parameter 1 to be an iterable of NativeResponse objects, "%s" given.', __METHOD__, get_debug_type($responses)));
238+
throw new \TypeError(sprintf('"%s()" expects parameter 1 to be an iterable of NativeResponse objects, "%s" given.', __METHOD__, get_debug_type($responses)));
239239
}
240240

241241
return new ResponseStream(NativeResponse::stream($responses, $timeout));

src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function __construct($redis, array $options = [])
5454
!$redis instanceof RedisProxy &&
5555
!$redis instanceof RedisClusterProxy
5656
) {
57-
throw new \InvalidArgumentException(sprintf('%s() expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\ClientInterface, "%s" given.', __METHOD__, get_debug_type($redis)));
57+
throw new \InvalidArgumentException(sprintf('"%s()" expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\ClientInterface, "%s" given.', __METHOD__, get_debug_type($redis)));
5858
}
5959

6060
if ($diff = array_diff(array_keys($options), ['prefix', 'ttl'])) {

src/Symfony/Component/HttpKernel/Controller/ArgumentResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function getArguments(Request $request, callable $controller): array
6262
}
6363

6464
if (!$atLeastOne) {
65-
throw new \InvalidArgumentException(sprintf('%s::resolve() must yield at least one value.', get_debug_type($resolver)));
65+
throw new \InvalidArgumentException(sprintf('"%s::resolve()" must yield at least one value.', get_debug_type($resolver)));
6666
}
6767

6868
// continue to the next controller argument

src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ public function format($value, int $type = self::TYPE_DEFAULT)
360360
}
361361

362362
if (self::CURRENCY === $this->style) {
363-
throw new NotImplementedException(sprintf('%s() method does not support the formatting of currencies (instance with CURRENCY style). "%s".', __METHOD__, NotImplementedException::INTL_INSTALL_MESSAGE));
363+
throw new NotImplementedException(sprintf('"%s()" method does not support the formatting of currencies (instance with CURRENCY style). "%s".', __METHOD__, NotImplementedException::INTL_INSTALL_MESSAGE));
364364
}
365365

366366
// Only the default type is supported.

src/Symfony/Component/Lock/Store/MemcachedStore.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function __construct(\Memcached $memcached, int $initialTtl = 300)
4646
}
4747

4848
if ($initialTtl < 1) {
49-
throw new InvalidArgumentException(sprintf('%s() expects a strictly positive TTL. Got %d.', __METHOD__, $initialTtl));
49+
throw new InvalidArgumentException(sprintf('"%s()" expects a strictly positive TTL. Got %d.', __METHOD__, $initialTtl));
5050
}
5151

5252
$this->memcached = $memcached;
@@ -74,7 +74,7 @@ public function save(Key $key)
7474
public function putOffExpiration(Key $key, float $ttl)
7575
{
7676
if ($ttl < 1) {
77-
throw new InvalidTtlException(sprintf('%s() expects a TTL greater or equals to 1 second. Got %s.', __METHOD__, $ttl));
77+
throw new InvalidTtlException(sprintf('"%s()" expects a TTL greater or equals to 1 second. Got %s.', __METHOD__, $ttl));
7878
}
7979

8080
// Interface defines a float value but Store required an integer.

src/Symfony/Component/Lock/Store/PdoStore.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function __construct($connOrDsn, array $options = [], float $gcProbabilit
8181
throw new InvalidArgumentException(sprintf('"%s" requires gcProbability between 0 and 1, "%f" given.', __METHOD__, $gcProbability));
8282
}
8383
if ($initialTtl < 1) {
84-
throw new InvalidTtlException(sprintf('%s() expects a strictly positive TTL, "%d" given.', __METHOD__, $initialTtl));
84+
throw new InvalidTtlException(sprintf('"%s()" expects a strictly positive TTL, "%d" given.', __METHOD__, $initialTtl));
8585
}
8686

8787
if ($connOrDsn instanceof \PDO) {
@@ -146,7 +146,7 @@ public function save(Key $key)
146146
public function putOffExpiration(Key $key, float $ttl)
147147
{
148148
if ($ttl < 1) {
149-
throw new InvalidTtlException(sprintf('%s() expects a TTL greater or equals to 1 second. Got %s.', __METHOD__, $ttl));
149+
throw new InvalidTtlException(sprintf('"%s()" expects a TTL greater or equals to 1 second. Got %s.', __METHOD__, $ttl));
150150
}
151151

152152
$key->reduceLifetime($ttl);

0 commit comments

Comments
 (0)
0