Skip to content

[Router][DX] Relative resource references should resolve against the config file's location #24982

Closed
@backbone87

Description

@backbone87

When using relative route resource references, these references are resolved against the kernel root dir and not like all other config files against the file's location itself.
This is also mentioned in the ticket implementing relative route resource references: #21231 (comment)

This is especially painful because using file relative references sometimes work:

app:
    resource: ../../src/Action/
    type:     annotation

This config works for me in one project, but in another project, i had to use:

app:
    resource: Action/
    type:     annotation

And i dont know why it works in one and not the other, both use the 3.4-BETA2 and are bundle less apps with kernel at /src/Kernel.php and config file at /etc/_common/_routing.yml

Metadata

Metadata

Assignees

No one assigned

    Labels

    DXDX = Developer eXperience (anything that improves the experience of using Symfony)Routing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions