bug #34649 more robust initialization from request (dbu)
bug #34649 more robust initialization from request (dbu)

This PR was merged into the 3.4 branch.

Discussion
----------

more robust initialization from request

Request::getPort is declared as int|string but can actually return null.

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

I discovered this problem with a functional test where i dispatch the RequestEvent with a `new Request()`. This used to work in symfony 4 and now triggers an error `Argument 1 passed to Symfony\Component\Routing\RequestContext::setHttpPort() must be of the type int, null given`

In regular web requests, this should probably never happen, but it seems to me if Request is not robust, the RequestContext should be robust about it.

Commits
-------

c6ed0f0208 more robust initialization from request

kbond/symfony,pyrech/symfony,shieldo/symfony,tgalopin/symfony,curry684/symfony,nicolas-grekas/symfony,d-ph/symfony,lstrojny/symfony,Tobion/symfony,oleg-andreyev/symfony,curry684/symfony,ogizanagi/symfony,pierredup/symfony,Deamon/symfony,zerkms/symfony,mpdude/symfony,HeahDude/symfony,Nyholm/symfony,mnapoli/symfony,HeahDude/symfony,mpdude/symfony,phramz/symfony,fabpot/symfony,jvasseur/symfony,jderusse/symfony,Simperfit/symfony,gonzalovilaseca/symfony,paradajozsef/symfony,Slamdunk/symfony,stof/symfony,mpdude/symfony,chalasr/symfony,OskarStark/symfony,oleg-andreyev/symfony,zorn-v/symfony,zorn-v/symfony,jderusse/symfony,ogizanagi/symfony,tgalopin/symfony,mnapoli/symfony,stof/symfony,Koc/symfony,symfony/symfony,ragboyjr/symfony,curry684/symfony,lyrixx/symfony,smatyas/symfony,Nyholm/symfony,Tobion/symfony,xabbuh/symfony,dmaicher/symfony,bendavies/symfony,mweimerskirch/symfony,chalasr/symfony,pyrech/symfony,derrabus/symfony,1ed/symfony,smatyas/symfony,zerkms/symfony,localheinz/symfony,Tobion/symfony,stof/symfony,1ed/symfony,fabpot/symfony,mweimerskirch/symfony,Simperfit/symfony,pyrech/symfony,smatyas/symfony,fabpot/symfony,mnapoli/symfony,kbond/symfony,paradajozsef/symfony,dmaicher/symfony,ogizanagi/symfony,Nyholm/symfony,Taluu/symfony,Simperfit/symfony,zorn-v/symfony,mpdude/symfony,MatTheCat/symfony,garak/symfony,MatTheCat/symfony,ragboyjr/symfony,Koc/symfony,d-ph/symfony,stof/symfony,damienalexandre/symfony,alekitto/symfony,pierredup/symfony,phramz/symfony,dmaicher/symfony,Tobion/symfony,pierredup/symfony,sgehrig/symfony,alekitto/symfony,lstrojny/symfony,damienalexandre/symfony,ro0NL/symfony,ro0NL/symfony,jvasseur/symfony,Koc/symfony,fabpot/symfony,chalasr/symfony,jvasseur/symfony,maidmaid/symfony,mweimerskirch/symfony,smatyas/symfony,Taluu/symfony,1ed/symfony,symfony/symfony,xabbuh/symfony,Deamon/symfony,jvasseur/symfony,tucksaun/symfony,localheinz/symfony,dmaicher/symfony,kbond/symfony,nicolas-grekas/symfony,OskarStark/symfony,ogizanagi/symfony,bendavies/symfony,jakzal/symfony,damienalexandre/symfony,paradajozsef/symfony,MatTheCat/symfony,d-ph/symfony,ro0NL/symfony,pierredup/symfony,jakzal/symfony,sgehrig/symfony,voronkovich/symfony,Nyholm/symfony,chalasr/symfony,bendavies/symfony,xabbuh/symfony,paradajozsef/symfony,nicolas-grekas/symfony,gonzalovilaseca/symfony,HeahDude/symfony,maidmaid/symfony,jderusse/symfony,sgehrig/symfony,Deamon/symfony,ragboyjr/symfony,localheinz/symfony,phramz/symfony,maidmaid/symfony,symfony/symfony,symfony/symfony,Slamdunk/symfony,voronkovich/symfony,garak/symfony,Taluu/symfony,jakzal/symfony,shieldo/symfony,derrabus/symfony,alekitto/symfony,Deamon/symfony,hhamon/symfony,garak/symfony,gonzalovilaseca/symfony,zerkms/symfony,pyrech/symfony,smatyas/symfony,damienalexandre/symfony,jakzal/symfony,localheinz/symfony,gonzalovilaseca/symfony,zerkms/symfony,shieldo/symfony,curry684/symfony,mnapoli/symfony,bendavies/symfony,mweimerskirch/symfony,ragboyjr/symfony,MatTheCat/symfony,tucksaun/symfony,tucksaun/symfony,kbond/symfony,tucksaun/symfony,jderusse/symfony,Koc/symfony,1ed/symfony,Taluu/symfony,lyrixx/symfony,Deamon/symfony,Simperfit/symfony,hhamon/symfony,maidmaid/symfony,OskarStark/symfony,hhamon/symfony,lyrixx/symfony,ro0NL/symfony,shieldo/symfony,zorn-v/symfony,OskarStark/symfony,oleg-andreyev/symfony,Slamdunk/symfony,HeahDude/symfony,phramz/symfony,Slamdunk/symfony,lstrojny/symfony,Simperfit/symfony,mweimerskirch/symfony,garak/symfony,sgehrig/symfony,voronkovich/symfony,d-ph/symfony,tgalopin/symfony,derrabus/symfony,voronkovich/symfony,tgalopin/symfony,nicolas-grekas/symfony,oleg-andreyev/symfony,derrabus/symfony,hhamon/symfony,lyrixx/symfony,alekitto/symfony,mnapoli/symfony,xabbuh/symfony