Skip to content

[FrameworkBundle] URL for setting the request context #35121

Closed
@alanpoulain

Description

@alanpoulain

Description
Today when we want to change the generated URLs in commands, we need to set a lot of parameters (scheme, host, port, ...): https://symfony.com/doc/current/routing.html#generating-urls-in-commands.

It could be useful and less cumbersome to set an URL instead. It would be parsed in a compiler pass and the parameters would be set there.

Example
Before:

# config/services.yaml
parameters:
    router.request_context.scheme: 'https'
    router.request_context.host: 'example.org'
    request_listener.https_port: 8443

After:

# config/services.yaml
parameters:
    router.request_context.url: 'https://example.org:8443'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions