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 #57610 [PsrHttpMessageBridge] Remove a redundant check in HttpFoundationFactory class (seriquynh)
This PR was merged into the 7.2 branch.
Discussion
----------
[PsrHttpMessageBridge] Remove a redundant check in HttpFoundationFactory class
| Q | A
| ------------- | ---
| Branch? | 7.2
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Issues | N/A
| License | MIT
`HttpFoundationFactory::createRequest` method receives an implementation of `ServerRequestInterface` and it's `getUri` method must always return a `UriInterface` implementation. So, this check below is redundant.
```php
<?php
$uri = $psrRequest->getUri(); // absolutely is \Psr\Http\Message\UriInterface
if ($uri instanceof UriInterface) { // redundant check
// Do something
}
```
### My Concern
I've checked Symfony roadmap/releases [here](https://symfony.com/releases). And I decided to create a PR to branch 6.4 because:
- PsrHttpMessage is included in v6.4 (not in 5.4).
- v6.4 is still maintained (v6.0, v6.1, v6.2 and v6.3 are "End of life" versions).
- It is not a breaking/major change.
Did I choose branch correctly? If not, please give me more references/posts about how to choose a right branch for a PR.
Commits
-------
8e7e208149 Remove redundant check
0 commit comments