You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #21407 [WebServerBundle] Improved exception message (wouterj)
This PR was merged into the 3.3-dev branch.
Discussion
----------
[WebServerBundle] Improved exception message
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This is a quite minor one, but imo "guessing" is something that's optional. If I don't pass value X, a script will guess value X. However, in this case, the front controller file cannot be specified. It has to be one of the "guessed" file names. That's why I renamed "guessing" to "finding".
While doing this, I also added the possible file names in the exception message to ease fixing problems.
Commits
-------
df46188 Improved exception message
Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebServerBundle/WebServerConfig.php
+12-11Lines changed: 12 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -28,8 +28,8 @@ public function __construct($documentRoot, $env, $address = null, $router = null
28
28
thrownew \InvalidArgumentException(sprintf('The document root directory "%s" does not exist.', $documentRoot));
29
29
}
30
30
31
-
if (null === $file = $this->guessFrontController($documentRoot, $env)) {
32
-
thrownew \InvalidArgumentException(sprintf('Unable to guess the front controller under "%s".', $documentRoot));
31
+
if (null === $file = $this->findFrontController($documentRoot, $env)) {
32
+
thrownew \InvalidArgumentException(sprintf('Unable to find the front controller under "%s" (none of these files exist: %s).', $documentRoot, implode(', ', $this<
8000
span class="x">->getFrontControllerFileNames($env))));
0 commit comments