Skip to content

[Routing] make it possible so that env parameter can set a array #61344

@JohJohan

Description

@JohJohan

Description

I would like to have it so that the Symfony\Component\Routing\Attribute\Route parameter $env can be set as an array a case for this is that i would like to make a route available for local and testing env now i would need 2 routes:

#[Route('/test, name: 'test, env: 'local')]
#[Route('/test', name: 'test-testing', env: 'testing')]

It would be nice if you could set:

#[Route('/test, name: 'test, env: ['local', 'testing'])]

Example

Old:

#[Route('/test, name: 'test, env: 'local')]
#[Route('/test', name: 'test-testing', env: 'testing')]

New:

#[Route('/test, name: 'test, env: ['local', 'testing'])]

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