-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
Symfony version(s) affected
6.4
Description
The framework.router.default_uri
config is used to define the request context as fallback for the case that no HTTP request is available. But it does not affect the container params
router.request_context.base_url
router.request_context.host
router.request_context.scheme
They still use the defaults, which are defined in the routing.php config file of the framework bundle.
This leads to inconsistency and confusion if a third party bundle relies on the container parameters instead of the request context service (for example at the Sulu CMS in this file).
How to reproduce
Define the framework.router.default_uri
config for example with the value https://example.com
. And then do
bin/console debug:container --parameters | grep request_context
in the console. You'll see that the host is still localhost
and the scheme http
.
Possible Solution
I am not sure. Either the mentioned container params should be replaced by the values of the default_uri or they should be deprecated in favor of the request context service.
Additional Context
No response