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 #58241 [HttpKernel] allow narrow type of not nullable getResponse when hasResponse has been called (shyim)
This PR was submitted for the 5.4 branch but it was squashed and merged into the 7.2 branch instead.
Discussion
----------
[HttpKernel] allow narrow type of not nullable getResponse when hasResponse has been called
| Q | A
| ------------- | ---
| Branch? | 7.3
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Issues |
| License | MIT
```php
if ($event->hasResponse()) {
return $event->getResponse();
}
```
PHPStan understands now inside the if that Response is not nullable anymore
Commits
-------
69f2f48 [HttpKernel] allow narrow type of not nullable getResponse when hasResponse has been called
0 commit comments