diff --git a/src/Symfony/Component/BrowserKit/AbstractBrowser.php b/src/Symfony/Component/BrowserKit/AbstractBrowser.php index de85599fd7..dbd6051c8f 100644 --- a/src/Symfony/Component/BrowserKit/AbstractBrowser.php +++ b/src/Symfony/Component/BrowserKit/AbstractBrowser.php @@ -451,7 +451,7 @@ abstract class AbstractBrowser } if (!$process->isSuccessful() || !preg_match('/^O\:\d+\:/', $process->getOutput())) { - throw new \RuntimeException(sprintf('OUTPUT: %s ERROR OUTPUT: %s', $process->getOutput(), $process->getErrorOutput())); + throw new \RuntimeException(sprintf('OUTPUT: %s ERROR OUTPUT: %s.', $process->getOutput(), $process->getErrorOutput())); } return unserialize($process->getOutput()); diff --git a/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php b/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php index 62ba4d9a82..48d2f5ec4b 100644 --- a/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php @@ -25,7 +25,7 @@ class ApcuAdapter extends AbstractAdapter public function __construct(string $namespace = '', int $defaultLifetime = 0, string $version = null) { if (!static::isSupported()) { - throw new CacheException('APCu is not enabled'); + throw new CacheException('APCu is not enabled.'); } if ('cli' === \PHP_SAPI) { ini_set('apc.use_request_time', 0); diff --git a/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php b/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php index e2bc068050..1ac98405a0 100644 --- a/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php @@ -48,7 +48,7 @@ class MemcachedAdapter extends AbstractAdapter public function __construct(\Memcached $client, string $namespace = '', int $defaultLifetime = 0, MarshallerInterface $marshaller = null) { if (!static::isSupported()) { - throw new CacheException('Memcached >= 2.2.0 is required'); + throw new CacheException('Memcached >= 2.2.0 is required.'); } if ('Memcached' === \get_class($client)) { $opt = $client->getOption(\Memcached::OPT_SERIALIZER); @@ -95,7 +95,7 @@ class MemcachedAdapter extends AbstractAdapter throw new InvalidArgumentException(sprintf('MemcachedAdapter::createClient() expects array or string as first argument, %s given.', \gettype($servers))); } if (!static::isSupported()) { - throw new CacheException('Memcached >= 2.2.0 is required'); + throw new CacheException('Memcached >= 2.2.0 is required.'); } set_error_handler(function ($type, $msg, $file, $line) { throw new \ErrorException($msg, 0, $type, $file, $line); }); try { @@ -110,7 +110,7 @@ class MemcachedAdapter extends AbstractAdapter continue; } if (0 !== strpos($dsn, 'memcached:')) { - throw new InvalidArgumentException(sprintf('Invalid Memcached DSN: %s does not start with "memcached:"', $dsn)); + throw new InvalidArgumentException(sprintf('Invalid Memcached DSN: %s does not start with "memcached:".', $dsn)); } $params = preg_replace_callback('#^memcached:(//)?(?:([^@]*+)@)?#', function ($m) use (&$username, &$password) { if (!empty($m[2])) { @@ -120,7 +120,7 @@ class MemcachedAdapter extends AbstractAdapter return 'file:'.($m[1] ?? ''); }, $dsn); if (false === $params = parse_url($params)) { - throw new InvalidArgumentException(sprintf('Invalid Memcached DSN: %s', $dsn)); + throw new InvalidArgumentException(sprintf('Invalid Memcached DSN: %s.', $dsn)); } $query = $hosts = []; if (isset($params['query'])) { @@ -128,7 +128,7 @@ class MemcachedAdapter extends AbstractAdapter if (isset($query['host'])) { if (!\is_array($hosts = $query['host'])) { - throw new InvalidArgumentException(sprintf('Invalid Memcached DSN: %s', $dsn)); + throw new InvalidArgumentException(sprintf('Invalid Memcached DSN: %s.', $dsn)); } foreach ($hosts as $host => $weight) { if (false === $port = strrpos($host, ':')) { @@ -147,7 +147,7 @@ class MemcachedAdapter extends AbstractAdapter } } if (!isset($params['host']) && !isset($params['path'])) { - throw new InvalidArgumentException(sprintf('Invalid Memcached DSN: %s', $dsn)); + throw new InvalidArgumentException(sprintf('Invalid Memcached DSN: %s.', $dsn)); } if (isset($params['path']) && preg_match('#/(\d+)$#', $params['path'], $m)) { $params['weight'] = $m[1]; diff --git a/src/Symfony/Component/Cache/Adapter/PdoAdapter.php b/src/Symfony/Component/Cache/Adapter/PdoAdapter.php index 99a671516a..73e4695ba8 100644 --- a/src/Symfony/Component/Cache/Adapter/PdoAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/PdoAdapter.php @@ -73,7 +73,7 @@ class PdoAdapter extends AbstractAdapter implements PruneableInterface if ($connOrDsn instanceof \PDO) { if (\PDO::ERRMODE_EXCEPTION !== $connOrDsn->getAttribute(\PDO::ATTR_ERRMODE)) { - throw new InvalidArgumentException(sprintf('"%s" requires PDO error mode attribute be set to throw Exceptions (i.e. $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION))', __CLASS__)); + throw new InvalidArgumentException(sprintf('"%s" requires PDO error mode attribute be set to throw Exceptions (i.e. $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION)).', __CLASS__)); } $this->conn = $connOrDsn; diff --git a/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php b/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php index f148a8909f..71e52d43d4 100644 --- a/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php @@ -264,7 +264,7 @@ class PhpFilesAdapter extends AbstractAdapter implements PruneableInterface } if (!$ok && !is_writable($this->directory)) { - throw new CacheException(sprintf('Cache directory is not writable (%s)', $this->directory)); + throw new CacheException(sprintf('Cache directory is not writable (%s).', $this->directory)); } return $ok; diff --git a/src/Symfony/Component/Notifier/Bridge/Telegram/TelegramTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Telegram/TelegramTransportFactory.php index 9640d64c3c..9d70cdeaf9 100644 --- a/src/Symfony/Component/Notifier/Bridge/Telegram/TelegramTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Telegram/TelegramTransportFactory.php @@ -50,11 +50,11 @@ final class TelegramTransportFactory extends AbstractTransportFactory private function getToken(Dsn $dsn): string { if (null === $dsn->getUser() && null === $dsn->getPassword()) { - throw new IncompleteDsnException('Missing token'); + throw new IncompleteDsnException('Missing token.'); } if (null === $dsn->getPassword()) { - throw new IncompleteDsnException('Malformed token'); + throw new IncompleteDsnException('Malformed token.'); } return sprintf('%s:%s', $dsn->getUser(), $dsn->getPassword());