Skip to content

[FrameworkBundle] Configure RequestContext through router config #35229

Closed
@ogizanagi

Description

@ogizanagi

Description

Currently, there are three parameters allowing to configure the RequestContext:

  • router.request_context.host
  • router.request_context.scheme
  • router.request_context.base_url

(actually there is also request_listener.http_port & request_listener.https_port but these are in fact configured by the framework.router config.

While setting these parameters are common in an application and are documented, they have a poor discoverability (and even someone used with these has to keep looking at sources or the docs to find out their name).
So why not adding a new framework.router.context node in config as the preferred way to configure it?
Current parameters would be kept as defaultValue for BC (no need to deprecate them I guess, but we could still figure out a way to do so)

Example

framework:
    router:
        context:
            host: localhost
            schema: http
            base_url: null

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions