Fix more quotes in exception messages
This commit is contained in:
parent
2c4c19ce8b
commit
4ab6156c5a
@ -40,7 +40,7 @@ class RouterCacheWarmer implements CacheWarmerInterface, ServiceSubscriberInterf
|
|||||||
$this->router = $container;
|
$this->router = $container;
|
||||||
@trigger_error(sprintf('Using a "%s" as first argument of %s is deprecated since Symfony 3.4 and will be unsupported in version 4.0. Use a %s instead.', RouterInterface::class, __CLASS__, ContainerInterface::class), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Using a "%s" as first argument of %s is deprecated since Symfony 3.4 and will be unsupported in version 4.0. Use a %s instead.', RouterInterface::class, __CLASS__, ContainerInterface::class), E_USER_DEPRECATED);
|
||||||
} else {
|
} else {
|
||||||
throw new \InvalidArgumentException(sprintf('%s only accepts instance of Psr\Container\ContainerInterface as first argument.', __CLASS__));
|
throw new \InvalidArgumentException(sprintf('"%s" only accepts instance of Psr\Container\ContainerInterface as first argument.', __CLASS__));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ class TranslationsCacheWarmer implements CacheWarmerInterface, ServiceSubscriber
|
|||||||
$this->translator = $container;
|
$this->translator = $container;
|
||||||
@trigger_error(sprintf('Using a "%s" as first argument of %s is deprecated since Symfony 3.4 and will be unsupported in version 4.0. Use a %s instead.', TranslatorInterface::class, __CLASS__, ContainerInterface::class), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Using a "%s" as first argument of %s is deprecated since Symfony 3.4 and will be unsupported in version 4.0. Use a %s instead.', TranslatorInterface::class, __CLASS__, ContainerInterface::class), E_USER_DEPRECATED);
|
||||||
} else {
|
} else {
|
||||||
throw new \InvalidArgumentException(sprintf('%s only accepts instance of Psr\Container\ContainerInterface as first argument.', __CLASS__));
|
throw new \InvalidArgumentException(sprintf('"%s" only accepts instance of Psr\Container\ContainerInterface as first argument.', __CLASS__));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1201,7 +1201,7 @@ class FrameworkExtension extends Extension
|
|||||||
if ($container->fileExists($dir)) {
|
if ($container->fileExists($dir)) {
|
||||||
$dirs[] = $dir;
|
$dirs[] = $dir;
|
||||||
} else {
|
} else {
|
||||||
throw new \UnexpectedValueException(sprintf('%s defined in translator.paths does not exist or is not a directory.', $dir));
|
throw new \UnexpectedValueException(sprintf('"%s" defined in translator.paths does not exist or is not a directory.', $dir));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ class TemplateCacheWarmer implements CacheWarmerInterface, ServiceSubscriberInte
|
|||||||
$this->twig = $container;
|
$this->twig = $container;
|
||||||
@trigger_error(sprintf('Using a "%s" as first argument of %s is deprecated since Symfony 3.4 and will be unsupported in version 4.0. Use a %s instead.', Environment::class, __CLASS__, ContainerInterface::class), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Using a "%s" as first argument of %s is deprecated since Symfony 3.4 and will be unsupported in version 4.0. Use a %s instead.', Environment::class, __CLASS__, ContainerInterface::class), E_USER_DEPRECATED);
|
||||||
} else {
|
} else {
|
||||||
throw new \InvalidArgumentException(sprintf('%s only accepts instance of Psr\Container\ContainerInterface as first argument.', __CLASS__));
|
throw new \InvalidArgumentException(sprintf('"%s" only accepts instance of Psr\Container\ContainerInterface as first argument.', __CLASS__));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->iterator = $iterator;
|
$this->iterator = $iterator;
|
||||||
|
@ -48,7 +48,7 @@ trait RedisTrait
|
|||||||
throw new InvalidArgumentException(sprintf('RedisAdapter namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0]));
|
throw new InvalidArgumentException(sprintf('RedisAdapter namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0]));
|
||||||
}
|
}
|
||||||
if (!$redisClient instanceof \Redis && !$redisClient instanceof \RedisArray && !$redisClient instanceof \RedisCluster && !$redisClient instanceof \Predis\Client && !$redisClient instanceof RedisProxy) {
|
if (!$redisClient instanceof \Redis && !$redisClient instanceof \RedisArray && !$redisClient instanceof \RedisCluster && !$redisClient instanceof \Predis\Client && !$redisClient instanceof RedisProxy) {
|
||||||
throw new InvalidArgumentException(sprintf('%s() expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\Client, "%s" given.', __METHOD__, \is_object($redisClient) ? \get_class($redisClient) : \gettype($redisClient)));
|
throw new InvalidArgumentException(sprintf('"%s()" expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\Client, "%s" given.', __METHOD__, \is_object($redisClient) ? \get_class($redisClient) : \gettype($redisClient)));
|
||||||
}
|
}
|
||||||
$this->redis = $redisClient;
|
$this->redis = $redisClient;
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ final class ArgumentResolver implements ArgumentResolverInterface
|
|||||||
$resolved = $resolver->resolve($request, $metadata);
|
$resolved = $resolver->resolve($request, $metadata);
|
||||||
|
|
||||||
if (!$resolved instanceof \Generator) {
|
if (!$resolved instanceof \Generator) {
|
||||||
throw new \InvalidArgumentException(sprintf('%s::resolve() must yield at least one value.', \get_class($resolver)));
|
throw new \InvalidArgumentException(sprintf('"%s::resolve()" must yield at least one value.', \get_class($resolver)));
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($resolved as $append) {
|
foreach ($resolved as $append) {
|
||||||
|
@ -363,7 +363,7 @@ class NumberFormatter
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (self::CURRENCY === $this->style) {
|
if (self::CURRENCY === $this->style) {
|
||||||
throw new NotImplementedException(sprintf('%s() method does not support the formatting of currencies (instance with CURRENCY style). "%s".', __METHOD__, NotImplementedException::INTL_INSTALL_MESSAGE));
|
throw new NotImplementedException(sprintf('"%s()" method does not support the formatting of currencies (instance with CURRENCY style). "%s".', __METHOD__, NotImplementedException::INTL_INSTALL_MESSAGE));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only the default type is supported.
|
// Only the default type is supported.
|
||||||
|
@ -46,7 +46,7 @@ class MemcachedStore implements StoreInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($initialTtl < 1) {
|
if ($initialTtl < 1) {
|
||||||
throw new InvalidArgumentException(sprintf('%s() expects a strictly positive TTL. Got %d.', __METHOD__, $initialTtl));
|
throw new InvalidArgumentException(sprintf('"%s()" expects a strictly positive TTL. Got %d.', __METHOD__, $initialTtl));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->memcached = $memcached;
|
$this->memcached = $memcached;
|
||||||
@ -79,7 +79,7 @@ class MemcachedStore implements StoreInterface
|
|||||||
public function putOffExpiration(Key $key, $ttl)
|
public function putOffExpiration(Key $key, $ttl)
|
||||||
{
|
{
|
||||||
if ($ttl < 1) {
|
if ($ttl < 1) {
|
||||||
throw new InvalidArgumentException(sprintf('%s() expects a TTL greater or equals to 1. Got %s.', __METHOD__, $ttl));
|
throw new InvalidArgumentException(sprintf('"%s()" expects a TTL greater or equals to 1. Got %s.', __METHOD__, $ttl));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Interface defines a float value but Store required an integer.
|
// Interface defines a float value but Store required an integer.
|
||||||
|
@ -143,7 +143,7 @@ class RedisStore implements StoreInterface
|
|||||||
return \call_user_func_array([$this->redis, 'eval'], array_merge([$script, 1, $resource], $args));
|
return \call_user_func_array([$this->redis, 'eval'], array_merge([$script, 1, $resource], $args));
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new InvalidArgumentException(sprintf('%s() expects being initialized with a Redis, RedisArray, RedisCluster or Predis\ClientInterface, "%s" given.', __METHOD__, \is_object($this->redis) ? \get_class($this->redis) : \gettype($this->redis)));
|
throw new InvalidArgumentException(sprintf('"%s()" expects being initialized with a Redis, RedisArray, RedisCluster or Predis\ClientInterface, "%s" given.', __METHOD__, \is_object($this->redis) ? \get_class($this->redis) : \gettype($this->redis)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -45,7 +45,7 @@ class InputStream implements \IteratorAggregate
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($this->isClosed()) {
|
if ($this->isClosed()) {
|
||||||
throw new RuntimeException(sprintf('%s is closed.', static::class));
|
throw new RuntimeException(sprintf('"%s" is closed.', static::class));
|
||||||
}
|
}
|
||||||
$this->input[] = ProcessUtils::validateInput(__METHOD__, $input);
|
$this->input[] = ProcessUtils::validateInput(__METHOD__, $input);
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ abstract class AbstractPipes implements PipesInterface
|
|||||||
} elseif (!isset($this->inputBuffer[0])) {
|
} elseif (!isset($this->inputBuffer[0])) {
|
||||||
if (!\is_string($input)) {
|
if (!\is_string($input)) {
|
||||||
if (!is_scalar($input)) {
|
if (!is_scalar($input)) {
|
||||||
throw new InvalidArgumentException(sprintf('%s yielded a value of type "%s", but only scalars and stream resources are supported.', \get_class($this->input), \gettype($input)));
|
throw new InvalidArgumentException(sprintf('"%s" yielded a value of type "%s", but only scalars and stream resources are supported.', \get_class($this->input), \gettype($input)));
|
||||||
}
|
}
|
||||||
$input = (string) $input;
|
$input = (string) $input;
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ class ProcessUtils
|
|||||||
return new \IteratorIterator($input);
|
return new \IteratorIterator($input);
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new InvalidArgumentException(sprintf('%s only accepts strings, Traversable objects or stream resources.', $caller));
|
throw new InvalidArgumentException(sprintf('"%s" only accepts strings, Traversable objects or stream resources.', $caller));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $input;
|
return $input;
|
||||||
|
@ -200,7 +200,7 @@ class ProcessBuilderTest extends TestCase
|
|||||||
public function testInvalidInput()
|
public function testInvalidInput()
|
||||||
{
|
{
|
||||||
$this->expectException('Symfony\Component\Process\Exception\InvalidArgumentException');
|
$this->expectException('Symfony\Component\Process\Exception\InvalidArgumentException');
|
||||||
$this->expectExceptionMessage('Symfony\Component\Process\ProcessBuilder::setInput only accepts strings, Traversable objects or stream resources.');
|
$this->expectExceptionMessage('"Symfony\Component\Process\ProcessBuilder::setInput" only accepts strings, Traversable objects or stream resources.');
|
||||||
$builder = ProcessBuilder::create();
|
$builder = ProcessBuilder::create();
|
||||||
$builder->setInput([]);
|
$builder->setInput([]);
|
||||||
}
|
}
|
||||||
|
@ -263,7 +263,7 @@ class ProcessTest extends TestCase
|
|||||||
public function testInvalidInput($value)
|
public function testInvalidInput($value)
|
||||||
{
|
{
|
||||||
$this->expectException('Symfony\Component\Process\Exception\InvalidArgumentException');
|
$this->expectException('Symfony\Component\Process\Exception\InvalidArgumentException');
|
||||||
$this->expectExceptionMessage('Symfony\Component\Process\Process::setInput only accepts strings, Traversable objects or stream resources.');
|
$this->expectExceptionMessage('"Symfony\Component\Process\Process::setInput" only accepts strings, Traversable objects or stream resources.');
|
||||||
$process = $this->getProcess('foo');
|
$process = $this->getProcess('foo');
|
||||||
$process->setInput($value);
|
$process->setInput($value);
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ abstract class ObjectRouteLoader extends Loader
|
|||||||
$loaderObject = $this->getServiceObject($serviceString);
|
$loaderObject = $this->getServiceObject($serviceString);
|
||||||
|
|
||||||
if (!\is_object($loaderObject)) {
|
if (!\is_object($loaderObject)) {
|
||||||
throw new \LogicException(sprintf('%s:getServiceObject() must return an object: "%s" returned.', static::class, \gettype($loaderObject)));
|
throw new \LogicException(sprintf('"%s:getServiceObject()" must return an object: "%s" returned.', static::class, \gettype($loaderObject)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!method_exists($loaderObject, $method)) {
|
if (!method_exists($loaderObject, $method)) {
|
||||||
|
@ -221,7 +221,7 @@ class GuardAuthenticationListener implements ListenerInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$response instanceof Response) {
|
if (!$response instanceof Response) {
|
||||||
throw new \LogicException(sprintf('%s::onAuthenticationSuccess *must* return a Response if you want to use the remember me functionality. Return a Response, or set remember_me to false under the guard configuration.', \get_class($guardAuthenticator)));
|
throw new \LogicException(sprintf('"%s::onAuthenticationSuccess()" *must* return a Response if you want to use the remember me functionality. Return a Response, or set remember_me to false under the guard configuration.', \get_class($guardAuthenticator)));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->rememberMeServices->loginSuccess($request, $response, $token);
|
$this->rememberMeServices->loginSuccess($request, $response, $token);
|
||||||
|
@ -114,7 +114,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
|
|||||||
public function getIterator()
|
public function getIterator()
|
||||||
{
|
{
|
||||||
if (!\is_array($value = $this->getValue())) {
|
if (!\is_array($value = $this->getValue())) {
|
||||||
throw new \LogicException(sprintf('%s object holds non-iterable type "%s".', self::class, \gettype($value)));
|
throw new \LogicException(sprintf('"%s" object holds non-iterable type "%s".', self::class, \gettype($value)));
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($value as $k => $v) {
|
foreach ($value as $k => $v) {
|
||||||
|
Reference in New Issue
Block a user