minor #24741 [HttpFoundation] refactoring: calculate when need (ReenExe)
minor #24741 [HttpFoundation] refactoring: calculate when need (ReenExe)

This PR was submitted for the 2.7 branch but it was merged into the 3.4 branch instead (closes #24741).

Discussion
----------

[HttpFoundation] refactoring: calculate when need

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

HttpFoundation Request optimize

Commits
-------

79e8f57337 [HttpFoundation] refactoring: calculate when need

pamil/symfony,pamil/symfony,gencer/symfony,Simperfit/symfony,andreia/symfony,gonzalovilaseca/symfony,phramz/symfony,derrabus/symfony,gnat42/symfony,lyrixx/symfony,ajgarlag/symfony,symfony/symfony,arjenm/symfony,michaelperrin/symfony,fabpot/symfony,joelwurtz/symfony,Pierstoval/symfony,jderusse/symfony,bendavies/symfony,garak/symfony,andreia/symfony,phramz/symfony,zorn-v/symfony,lyrixx/symfony,HeahDude/symfony,pyrech/symfony,e-moe/symfony,shieldo/symfony,OskarStark/symfony,oleg-andreyev/symfony,dunglas/symfony,Einenlum/symfony,Tobion/symfony,andrerom/symfony,ogizanagi/symfony,docteurklein/symfony,oleg-andreyev/symfony,localheinz/symfony,andreia/symfony,zcodes/symfony,gencer/symfony,dmaicher/symfony,symfony/symfony,andrerom/symfony,jvasseur/symfony,maidmaid/symfony,gnat42/symfony,e-moe/symfony,arjenm/symfony,weaverryan/symfony,OskarStark/symfony,smatyas/symfony,lstrojny/symfony,tgalopin/symfony,Einenlum/symfony,1ed/symfony,localheinz/symfony,joelwurtz/symfony,apetitpa/symfony,pierredup/symfony,vincentaubert/symfony,Simperfit/symfony,yceruto/symfony,joelwurtz/symfony,zerkms/symfony,ragboyjr/symfony,d-ph/symfony,maidmaid/symfony,kbond/symfony,Koc/symfony,ogizanagi/symfony,andreia/symfony,frankdejonge/symfony,zorn-v/symfony,jderusse/symfony,sgehrig/symfony,sgehrig/symfony,Koc/symfony,jderusse/symfony,damienalexandre/symfony,jzawadzki/symfony,WhiteEagle88/symfony,ajgarlag/symfony,symfony/symfony,stof/symfony,c960657/symfony,gonzalovilaseca/symfony,tgalopin/symfony,chalasr/symfony,xabbuh/symfony,ragboyjr/symfony,andrerom/symfony,gonzalovilaseca/symfony,ro0NL/symfony,nicolas-grekas/symfony,xabbuh/symfony,paradajozsef/symfony,yceruto/symfony,nasimnabavi/symfony,voronkovich/symfony,jean-gui/symfony,Tobion/symfony,damienalexandre/symfony,garak/symfony,Deamon/symfony,MatTheCat/symfony,gimler/symfony,stof/symfony,docteurklein/symfony,ajgarlag/symfony,alekitto/symfony,Deamon/symfony,dmaicher/symfony,stof/symfony,fabpot/symfony,nicolas-grekas/symfony,mpdude/symfony,zorn-v/symfony,derrabus/symfony,romaricdrigon/symfony,Nyholm/symfony,weaverryan/symfony,Pierstoval/symfony,Nyholm/symfony,andrerom/symfony,paradajozsef/symfony,romaricdrigon/symfony,mnapoli/symfony,garak/symfony,michaelperrin/symfony,e-moe/symfony,iltar/symfony,docteurklein/symfony,alekitto/symfony,shieldo/symfony,gnat42/symfony,zerkms/symfony,romaricdrigon/symfony,mpdude/symfony,hacfi/symfony,ragboyjr/symfony,curry684/symfony,curry684/symfony,chalasr/symfony,mweimerskirch/symfony,Einenlum/symfony,iltar/symfony,zerkms/symfony,dmaicher/symfony,arjenm/symfony,mnapoli/symfony,nicolas-grekas/symfony,jzawadzki/symfony,kbond/symfony,zcodes/symfony,ogizanagi/symfony,hacfi/symfony,bendavies/symfony,paradajozsef/symfony,zorn-v/symfony,lstrojny/symfony,HeahDude/symfony,oleg-andreyev/symfony,damienalexandre/symfony,weaverryan/symfony,apetitpa/symfony,Taluu/symfony,Slamdunk/symfony,d-ph/symfony,Deamon/symfony,Simperfit/symfony,ro0NL/symfony,vincentaubert/symfony,ajgarlag/symfony,hacfi/symfony,deguif/symfony,mweimerskirch/symfony,sroze/symfony,Nyholm/symfony,hhamon/symfony,jvasseur/symfony,sroze/symfony,jakzal/symfony,sroze/symfony,HeahDude/symfony,HeahDude/symfony,alekitto/symfony,iltar/symfony,sgehrig/symfony,alekitto/symfony,fabpot/symfony,Slamdunk/symfony,jderusse/symfony,Tobion/symfony,kbond/symfony,dunglas/symfony,paradajozsef/symfony,tucksaun/symfony,c960657/symfony,gimler/symfony,teohhanhui/symfony,1ed/symfony,nicolas-grekas/symfony,teohhanhui/symfony,Taluu/symfony,kbond/symfony,damienalexandre/symfony,pyrech/symfony,stof/symfony,MatTheCat/symfony,nasimnabavi/symfony,jean-gui/symfony,Pierstoval/symfony,ro0NL/symfony,c960657/symfony,Koc/symfony,deguif/symfony,dunglas/symfony,gimler/symfony,curry684/symfony,deguif/symfony,OskarStark/symfony,pierredup/symfony,xabbuh/symfony,mweimerskirch/symfony,lyrixx/symfony,chalasr/symfony,Taluu/symfony,sgehrig/symfony,tgalopin/symfony,arjenm/symfony,tgalopin/symfony,hhamon/symfony,ragboyjr/symfony,sroze/symfony,hhamon/symfony,Einenlum/symfony,mweimerskirch/symfony,phramz/symfony,tucksaun/symfony,1ed/symfony,localheinz/symfony,symfony/symfony,frankdejonge/symfony,jvasseur/symfony,lstrojny/symfony,yceruto/symfony,mnapoli/symfony,voronkovich/symfony,shieldo/symfony,nasimnabavi/symfony,d-ph/symfony,zcodes/symfony,zcodes/symfony,shieldo/symfony,voronkovich/symfony,teohhanhui/symfony,c960657/symfony,lyrixx/symfony,jakzal/symfony,teohhanhui/symfony,derrabus/symfony,smatyas/symfony,oleg-andreyev/symfony,jean-gui/symfony,pierredup/symfony,nasimnabavi/symfony,bendavies/symfony,localheinz/symfony,mpdude/symfony,Deamon/symfony,apetitpa/symfony,jzawadzki/symfony,pamil/symfony,Slamdunk/symfony,ogizanagi/symfony,pamil/symfony,hhamon/symfony,jean-gui/symfony,maidmaid/symfony,tucksaun/symfony,iltar/symfony,jakzal/symfony,mnapoli/symfony,docteurklein/symfony,d-ph/symfony,phramz/symfony,gnat42/symfony,derrabus/symfony,bendavies/symfony,yceruto/symfony,jvasseur/symfony,smatyas/symfony,Slamdunk/symfony,Koc/symfony,joelwurtz/symfony,MatTheCat/symfony,xabbuh/symfony,apetitpa/symfony,Simperfit/symfony,vincentaubert/symfony,smatyas/symfony,michaelperrin/symfony,pyrech/symfony,dmaicher/symfony,MatTheCat/symfony,vincentaubert/symfony,michaelperrin/symfony,mnapoli/symfony,curry684/symfony,OskarStark/symfony,chalasr/symfony,gencer/symfony,jakzal/symfony,frankdejonge/symfony,docteurklein/symfony,smatyas/symfony,zerkms/symfony,1ed/symfony,WhiteEagle88/symfony,Simperfit/symfony,fabpot/symfony,pierredup/symfony,romaricdrigon/symfony,pyrech/symfony,weaverryan/symfony,Tobion/symfony,mweimerskirch/symfony,Nyholm/symfony,maidmaid/symfony,Deamon/symfony,ro0NL/symfony,garak/symfony,voronkovich/symfony,Pierstoval/symfony,tucksaun/symfony,Taluu/symfony,frankdejonge/symfony,gonzalovilaseca/symfony,gimler/symfony,deguif/symfony,mpdude/symfony,WhiteEagle88/symfony,e-moe/symfony