-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle][Routing] Show welcome message if no routes are configured #24403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Failures:
|
src/Symfony/Bundle/FrameworkBundle/EventListener/NoRoutingConfigurationSubscriber.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/EventListener/NoRoutingConfigurationSubscriber.php
Outdated
Show resolved
Hide resolved
$code .= " if ('/' === \$pathinfo) {\n"; | ||
$code .= " throw new Symfony\Component\Routing\Exception\NoConfigurationException();\n"; | ||
$code .= " }\n"; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this approach, makes a lot of sense to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 ingenious indeed.
src/Symfony/Component/HttpKernel/EventListener/RouterListener.php
Outdated
Show resolved
Hide resolved
Status: Needs Review |
Now the solution looks better to me, so the response is setting on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice :)
src/Symfony/Component/HttpKernel/EventListener/RouterListener.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/HttpKernel/EventListener/RouterListener.php
Outdated
Show resolved
Hide resolved
a2670cc
to
d83b578
Compare
@yceruto Can you also patch the other URL matchers like |
@fabpot indeed, thanks. |
@yceruto I think we need support for the new exception in |
@fabpot done. |
Thank you @yceruto. |
…routes are configured (yceruto) This PR was merged into the 3.4 branch. Discussion ---------- [FrameworkBundle][Routing] Show welcome message if no routes are configured | Q | A | ------------- | --- | Branch? | 3.4 (it would be good, else 4.1) | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony/flex#20 | License | MIT | Doc PR | - Another attempt to improve the first time experience with a different technical approach this time. Just after a fresh "SymfonyFlex" installation: ```bash $ composer create-project symfony/skeleton flex $ cd flex $ make serve ```  When the first route is added, this message is no longer displayed (same if debug mode is disabled). ping @javiereguiluz, @sstok Commits ------- e097ab3 Show welcome message if no routing configuration could be found
Another attempt to improve the first time experience with a different technical approach this time.
Just after a fresh "SymfonyFlex" installation:
$ composer create-project symfony/skeleton flex $ cd flex $ make serve
When the first route is added, this message is no longer displayed (same if debug mode is disabled).
ping @javiereguiluz, @sstok