Skip to content

[HttpKernel] Better exception page when the invokable controller returns nothing #30408

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

Merged
merged 1 commit into from
Mar 5, 2019

Conversation

dimabory
Copy link
Contributor

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #27138
License MIT
Doc PR

Prerequisites
Configure invokable controller

# config/routes.yaml
index:
    path: /
    controller: App\Controller\Start

Before:
before

After:
after


Take a look for an enhancement/refactoring in HttpKernel.php

@dimabory dimabory force-pushed the http-kernel-exception-controller branch from 7f8dbc1 to ff3e504 Compare March 1, 2019 08:25
@nicolas-grekas nicolas-grekas added this to the next milestone Mar 4, 2019
@dimabory dimabory force-pushed the http-kernel-exception-controller branch from ff3e504 to f6c1622 Compare March 5, 2019 08:07
@fabpot
Copy link
Member

fabpot commented Mar 5, 2019

Thank you @dimabory.

@fabpot fabpot merged commit f6c1622 into symfony:master Mar 5, 2019
fabpot added a commit that referenced this pull request Mar 5, 2019
…controller returns nothing (dimabory)

This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpKernel] Better exception page when the invokable controller returns nothing

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #27138
| License       | MIT
| Doc PR        |

---

__Prerequisites__
_Configure invokable controller_
```php
# config/routes.yaml
index:
    path: /
    controller: App\Controller\Start
```

__Before:__
![before](https://user-images.githubusercontent.com/11414342/53577698-ca739000-3b7e-11e9-98ac-8c8e27626fbe.png)

__After:__
![after](https://user-images.githubusercontent.com/11414342/53577733-df502380-3b7e-11e9-8377-a4a97ea73df8.png)

---

Take a look for an enhancement/refactoring in `HttpKernel.php`

Commits
-------

f6c1622 [HttpKernel] Better exception page when the invokable controller returns nothing
@dimabory dimabory deleted the http-kernel-exception-controller branch March 5, 2019 09:49
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019
@fabpot fabpot mentioned this pull request May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants