Skip to content

Commit 875414e

Browse files
committed
Merge branch '4.4' into 5.0
* 4.4: Add missing dots at the end of exception messages [DI][Form] Fixed test suite (TimeType changes & unresolved merge conflict) Fix bad merge Add missing dots at the end of exception messages
2 parents d766eb8 + 8e6b70b commit 875414e

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

Controller/ContainerControllerResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ protected function instantiateController(string $class)
6464
throw new \InvalidArgumentException(sprintf('Controller "%s" has required constructor arguments and does not exist in the container. Did you forget to define the controller as a service?', $class), 0, $e);
6565
}
6666

67-
throw new \InvalidArgumentException(sprintf('Controller "%s" does neither exist as service nor as class', $class), 0, $e);
67+
throw new \InvalidArgumentException(sprintf('Controller "%s" does neither exist as service nor as class.', $class), 0, $e);
6868
}
6969

7070
private function throwExceptionIfControllerWasRemoved(string $controller, \Throwable $previous)

Controller/ControllerResolver.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ public function getController(Request $request)
6464
}
6565

6666
if (!\is_callable($controller)) {
67-
throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable. %s', $request->getPathInfo(), $this->getControllerError($controller)));
67+
throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable. %s.', $request->getPathInfo(), $this->getControllerError($controller)));
6868
}
6969

7070
return $controller;
7171
}
7272

7373
if (\is_object($controller)) {
7474
if (!\is_callable($controller)) {
75-
throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable. %s', $request->getPathInfo(), $this->getControllerError($controller)));
75+
throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable. %s.', $request->getPathInfo(), $this->getControllerError($controller)));
7676
}
7777

7878
return $controller;
@@ -85,11 +85,11 @@ public function getController(Request $request)
8585
try {
8686
$callable = $this->createController($controller);
8787
} catch (\InvalidArgumentException $e) {
88-
throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable. %s', $request->getPathInfo(), $e->getMessage()), 0, $e);
88+
throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable. %s.', $request->getPathInfo(), $e->getMessage()), 0, $e);
8989
}
9090

9191
if (!\is_callable($callable)) {
92-
throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable. %s', $request->getPathInfo(), $this->getControllerError($callable)));
92+
throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable. %s.', $request->getPathInfo(), $this->getControllerError($callable)));
9393
}
9494

9595
return $callable;

DataCollector/DumpDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public function getDumps($format, $maxDepthLimit = -1, $maxItemsPerDepth = -1):
193193
$dumper = new HtmlDumper($data, $this->charset);
194194
$dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]);
195195
} else {
196-
throw new \InvalidArgumentException(sprintf('Invalid dump format: %s', $format));
196+
throw new \InvalidArgumentException(sprintf('Invalid dump format: %s.', $format));
197197
}
198198
$dumps = [];
199199

Kernel.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ protected function initializeBundles()
369369
foreach ($this->registerBundles() as $bundle) {
370370
$name = $bundle->getName();
371371
if (isset($this->bundles[$name])) {
372-
throw new \LogicException(sprintf('Trying to register two bundles with the same name "%s"', $name));
372+
throw new \LogicException(sprintf('Trying to register two bundles with the same name "%s".', $name));
373373
}
374374
$this->bundles[$name] = $bundle;
375375
}
@@ -624,10 +624,10 @@ protected function buildContainer()
624624
foreach (['cache' => $this->warmupDir ?: $this->getCacheDir(), 'logs' => $this->getLogDir()] as $name => $dir) {
625625
if (!is_dir($dir)) {
626626
if (false === @mkdir($dir, 0777, true) && !is_dir($dir)) {
627-
throw new \RuntimeException(sprintf("Unable to create the %s directory (%s)\n", $name, $dir));
627+
throw new \RuntimeException(sprintf("Unable to create the %s directory (%s)\n.", $name, $dir));
628628
}
629629
} elseif (!is_writable($dir)) {
630-
throw new \RuntimeException(sprintf("Unable to write in the %s directory (%s)\n", $name, $dir));
630+
throw new \RuntimeException(sprintf("Unable to write in the %s directory (%s)\n.", $name, $dir));
631631
}
632632
}
633633

0 commit comments

Comments
 (0)